Use RAII approaches for hardware information detection
Eliminated gmx_hardware_info_free. The lifetime of the hardware info
should be from the first time it is needed until the end of the
process, and in particular its ownership should not be related to the
lifetime of any threads implementing mdrun.
The implementation of gmx_detect_hardware now uses a simple mutex and
file static smart pointer to hold the data, lazily create it, and leave
it to process cleanup to call the destructor to free resources. Helper
functions no longer refer to the static smart pointer directly.
Internal data structures of gmx_hw_info_t are now held by smart pointer rather
than needing manual memory cleanup.
Extended not_null to be able to be created from smart pointers, and
tested the new behaviours.
Reduced the header dependencies of detecthardware.cpp, now that it
doesn't do all the string handling of printhardware.cpp
Change-Id: I9d5cd838dc6e214163cf2e3104e0f7aaa356fcf8