Put the C++ API for the logging module into its own library; re-arranged header files to be more consistent with other modules.