Refactor Undo/Redo functionality

* Move major parts of undo, redo and backStore from
  EditTrack.js to ScratchPad.js
* Implement a Stack class to prevent overflow of
  Undo and Redo stacks

Signed-off-by: Harsh Gupta <gupta.harsh96@gmail.com>