HPCC-10591 Free library graphs before killing memory manager

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>