Add a few namespaces and fix header guards.

This enables us to do unity builds and abuse the linker to find unused symbols for a given build. This might be usefull to find dead code.

A first test produces the following list of unused symbols in the qt console build. https://gist.github.com/ZobyTwo/94911a43844ce2271759