SWIG: Fix namespace errors
SWIG: Remove prebuild wrapper
SWIG: Build bindings with cmake
SWIG: fix PERL binding

PERL pollutes the C++ namespace. To work around that the #undef
statements need to be put *before* the %include statements.