Adds ability to specify a function as the defaultsTo property for models

This should be helpful to some people. Calls the `defaultsTo` function with the context of the model, so all attributes are available during model creation.