48809579 Refactor lookup of factories to use a factory_for function.
Now, factory classes are created on demand unless they already exist.
Default factory attribute generation can be overridden by defining the
factory class explicitly and defining the attributes that are to
override the defaults.