Don't use ObjectIndex when retrieving singletons

There was an inconsistency in that getInstances was using a private
list of singleton instances, but getInstance(Class) was trying to use
the ObjectIndex.

Unfortunately, the use of the ObjectIndex is currently bugged due to
its loading ALL instances when any single instance type is requested.

Thus we update the getInstance(Class) implementation to use a private
hash of available instances.

A proper ObjectIndex implementation will need to wait for 3.0.0.