Conditional required

Allows the value for required in a schema definition to be a callback
name: { type: String, required: function () { // this is doc return true/false; } }

Note: this is my first pull request ever and I am struggling with Git. Hope I did things right.