BUG: Reinstate tab and form focus states (fixes CMS #732 and #817)

* Added methods to track and restore field focus
* Fixed restoreTabState function to track ss-tabset and added a trigger
event when tabstate reset