add optional ctest & catch2 based test infrastructure
This commit adds a CMakeLists.txt in the tests directory containing
the foundation for easily creating new test executables. It includes
creation of a shared library that the individual test executables can
be linked to, allowing them to be as small as possible.
The tests are optional and can be enabled with the CMake option
with_cxx_tests.
Also added is a first simple test case that always passes to show how
to create test cases.