Use beforeunload instead of unload

unload is asynchronous in Chrome 36 and so saving the state while
reloading may not happen before the state is read on the new render
process.
Only unload editor window when confirmed
Remove views and destroy project during unload
Remove hiding of body during reload

This appears to no longer be needed on Chrome 36
:lipstick:
Merge pull request #3223 from atom/ks-use-beforeunload

Save state during beforeunload event