kmswebrtcendpoint: Integrate main loop

Change-Id: If35b5910f3c3b657421825c16a3cc54d2c95b800