cmake: Revert to primarily using find modules
Following some discussion, we've decided to partly row back on the changes made in !223 (merged). pkg_check_modules
will still be used, but only to populate the .pc file. This also reverts to finding the Threads dependency earlier and checks that dependencies are actually found when linking against libxml2.