Define a factory.

@param {String} Type [optional]
@param {Function} Seed model
@api public
function define(type, Model) {
  if (arguments.length === 1) {
    Model = type;
    type = Model.prototype.__type || Model.modelName;
  }

  var factory = new Factory(Model);
  factories.set(type, factory)

  return factory;
}