(WIP) Events

Todo:
- [x] Read events from the user command response
- [x] Read events from the message stream
- [x] Make a loop to do longpolling/shortpolling
- [x] Replace std:cerr by exceptions
- [ ] mutex
I have to admit it's been a while for me that I worked on MT code, but doesn't a [condition variable](http://www.codeproject.com/Articles/598695/Cplusplus-threads-locks-and-condition-variables) make a lot of sense here? That would also allow you to interrupt the 5 (which could also be set to a much higher value) second interval, so a shutdown process won't have to block in order to shutdown gracefully.