Added -dev and -dbg packages and fixed source

- added definitions to debian/control
- added debian install rules
- added installation of headers into CMakeLists.txt

- changed scope guards for uniformity
- uses std::function instead of raw pointer to register handlers
- handlers moved into protection section
- upload handler prints info in xml format
Removed a commented code