don't include files while inside a namespace

this leads to weird effects. We now close all namespace before
including the respective *_impl.hpp file and open the namespace within
the file itself. This allows to safely include headers within
the impl files...