Implemented rudimentary BT & remote loss

- It is now detected if BT devices are lost (with a delay of up to 2 seconds) and appropiate events are send
- Lost BT devices can be redetected
- remote devices now gracefully shut down the websocket if the application is terminated which is picked up by the master device
- If the master device is lost, remote devices report the closed websocket back to the native layer which stops the remote state

The loss-code is pretty dirty right now, I will try to clean that up