Add Valgrind hooks for memory pools