[ContextManager] Fix Context deallocation

If the CONTEXT_MANAGER_WITH_MEMORY_MANAGER is enabled, then we need to
use putMemory().
52 jobs for fix-dealloc-in-context-manager in 6 minutes and 38 seconds (queued for 3 seconds)