Close websockets if uaid can't be registered.

(Not in master for debugging purposes)
Separate dispatch to own file

* added base unit tests websock
* removed confusing msg param
* fixed some comments
Added automatic version info

* added server socket close call on termination (optional, but polite)
Improved documentation