Primus integration and full back-end refactoring

- Replaced Socket.IO with Primus + SockJS
- Refactored the whole back-end.
- Fixed disconnection issues