Refactor code and break into modules.

1) Move tabs UI and functionality into tabs.js
2) Move Create project / file dialog functionality and UI to
model_dialogs.js
3) Move main window UI and controller to spark_window.js