BUILD: Add CMakeLists.txt and unit tests.
Fix compilation issues on Linux Clang/GCC.

- Add required this->.
- Add required typename.
- Add missing .c_str().
- Fix \ to / in included header paths.
- Replace illegal in-class template function specialization with boost::if_c< ... >
- Add missing using namespaces in unit tests.
- Remove deprecated boost::filesystem::path construction in unit tests.