Chaos::RegisterFactoryHelper

Static helper function to create and register a factory of the correct type. The returned Factory MUST be stored somewhere by the caller.