Added Container.registerFactory

Extended Container.resolve to support factories