Use check_symbol_exists() to check if cfree() is available
Thanks to Daniel Vratil for the initial work.
heaptrack now compiles on Fedora rawhide and Arch Linux x86_64
with glibc 2.26 or newer.
Differential Revision: https://phabricator.kde.org/D7621