Pass jslint

Thanks for the useful and interesting extension. I've made some changes that make the code pass JSLint (with the standard Brackets settings) and meet the [Brackets coding conventions](https://github.com/adobe/brackets/wiki/Brackets-Coding-Conventions).

On the diff it looks like I've changed a lot, but most of the code is unchanged.

Changes are:

1. Function's opening brackets are placed at the end of the line, instead of on a new line
2. Variables are defined with `var` only once
3. Functions are defined before they're used
4. `CommandManager.get()` is used instead of `this`. It can be hard to figure out what `this` refers to. Also, using `this` is a strict-mode violation
5. Doesn't use 'continue'. To do this, I use `forEach()` instead of `for` loops, from which we can return early