Restructured app modules structure and made app more robust

Most of the apps modules were rewritten and moved (sorry for the large commit).

All communication to the server takes place in separate modules under /js/server/ and uses the persistentSocket.js wrapper for connecting and reconnecting when needed.
The persistentSocket also makes the sockets reusable so that a close+open of a socket is not needed every time something needs to be run on the server.

The app now also uses more of Angular's features for updating the UI