Don't perform database update if record has not changed.

This change impacts hooks in that some of them are no longer
fired if the record has no changes to be saved.

New hooks:
* beforeValidation
* afterValidation

Closes #10