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. Use #228 if you need the test cases, otherwise this pull has a more elegant solution.