Fixed many linter errors in gui/app.js

gui/app.js had already some jslint settings in it, but it contained very many errors. This fixes most errors, but there are still some.