Added `beforeSave` as an option for the constructor.

Previously `beforeSave` could only be set on the individual functions
`insert` and update`. With this change, the caller need only provide it
once to the constructor options and the beforeSave function will be
invoked appropriately.