Editor switching2

@keertip @dinhviethoa 

This CL saves states of the open editors when switching between them. It also persists some state information into the preferences, so that some editor state is retained across sessions. Currently this is just the scroll position. Other changes:

 * add the ability to mock the ace editor
 * tests for editor change events
 * bug fix to the preferences code
 * implemented auto-save (explicit save and save as removed)
 * added the ability to wait on a workspace future, to know when it is fully restored

@ikarienator, it should be possible to tie a tab component up to this -