Multiply reliability improvements and fixes

- synchronous poll notifications
- basic custom signal handling to clear poll notifications queue
- server code is put into own namespace
- refactoring and cleanup
- one more useful example can be used to test client interfaces and statefs provider api