Public javascript cleanup

Hi Joshua,
this is my proposal for basic clean up of front-end javascript.
I've moved almost all inline code to module `js/ElectronIDE.js`.
I've also seperated definitions from initialisation calls (moved to `init` method) and cleaned up formatting.
`$(document).ready` now calls only `ElectronIDE.init()`.

IMHO this is more readable now, but with more features it will get messy again, so more modularisation may be required.
Have You considered using some proper SPA framework? AngularJS maybe?