Add before and after event callbacks.

Add before and after event callbacks.

 - Rename `enter` and `exit` to `before_enter` and `before_exit`.
 - Alias `enter` to `before_enter`.
 - Alias `exit` to `before_exit`.
 - Modify transition to call before and after callbacks.