add dirty check for leaving dashboard page if unsaved

this checks to see if there are unsaved changes.

the original state of the graphs is saved, and whenever you save successfully that state is updated. if you have unsaved changes, `$scope.graphs` and `original_graphs` will be out of sync and will prompt you.