chore(Grunt): add karma:unit task for running with default options.
fix(flashback.js): move saving of previousState to end(), add undefined guards in various functions, add store()