CMake: add HDF5 wrapper library to build system

b8604e3c intriduced a dependency on the HDF5 libraries. Add detection to
the CMake build system and add CMake rules for the wrapper library and
test.