Add before/after hooks for undo and redo

This pull request adds four new hooks. Namely:

* beforeUndo
* afterUndo
* beforeRedo
* afterRedo

In all cases a copy of the `action` object is passed to the handler. A new `type` property has been added to the Action classes so we can determine what kind of action was undone/redone. The type property can be one of the following values: 

* change
* create_row
* remove_row
* create_col
* remove_col

`beforeUndo` and `beforeRedo` can cancel the operation by returning `false`.

Every hook has the same signature:

~~~js
$container.handsontable({
  beforeUndo: function (action) {
    // ...
  }
});
~~~

The properties of `action` parameter depend on which action was undone/redone. The possible properties:

* data (change, remove_row, remove_col)
* type (always)
* index (create_row, create_col, remove_row, remove_col)
* amount (create_row, create_col)

This pull request fixes #1587.