Implemented cloning for objects when registered as singletons or factories.