Release webRtcEndpoint on error case.

Insert viewer endpoint in viewers before processing errors so that it
can be released when the stop function is called if any error happens.

Change-Id: Ieeb0f010ecfa2b99d8347105fb2442348dce9e75