Removed the horrible static fields in the ScopeTree/MemScopeMap
modules. Now the ScopeTree and MemScopeMap are stored in the
tests. This is a more satisfying "functional" implementation.