major changes
* switch to endpoints
* move connection to websocket
* move connectionmanager to connection
* complete connection states and reconnection logic
* refactor the messy bits of old connmgr/connfactory