use SplObjectStorage for child scopes

Child scopes should be unique objects, SplObjectStorage seemed a more appropriate data structure for these.