Add generic event triggers from core

Added hooks for the following events:

- Authenticating the user
- Before executing each REST API method
- After executing each REST API method
- When validating a model as it is about to be saved
- When saving a model to the database
- When deleting a model from the database

These hooks alone will meet the backend hook requirements for
the majority of plugins.