Enables option to only store changes on close

This patch adds a setting, "history_on_close", that when set to "true"
will only run the history check when a view is closed. This reduces the
stored changes to major ones.
Merge pull request #32 from phyllisstein/master

Option to only save history on closing a view