Move MonitoringThread to MiscCommon. Move implementation of MonitoringThread to header file.