Fixes to undo/redo

Actually implemented in paste and cut. No more for loops, single-entry
references to the handsontable api.