Adapted MemoryService to be able to register multiple CodeHeaps for VM monitoring and management. Merged changes from hg repository