TS-1843: detect and link libhwloc on Ubuntu

Fix the hwloc-enabled build on current and older Ubuntu releases.
This requires explicitly testing for the HWLOC_OBJ_PU symbol, and
using pkg-cofig to find the correct build options.