add grunt and beautify the JS files

This PR adds grunt and grunt-jsbeautifier to the project as well as making all the JS adhere to the same styling.

This is a suggested fix for #46

These are the options with which the JS is styled against:
`"brace_style": "collapse",
"break_chained_methods": false,
"e4x": false,
"eval_code": false,
"indent_char": " ",
"indent_level": 0,
"indent_size": 4,
"indent_with_tabs": false,
"jslint_happy": false,
"keep_array_indentation": false,
"keep_function_indentation": false,
"max_preserve_newlines": 10,
"preserve_newlines": true,
"space_before_conditional": true,
"space_in_paren": false,
"unescape_strings": false,
"wrap_line_length": 0`

As you can see, the main changes are explicitly making it 4 spaces for indentation and a space before a conditional.
As well as these, there is a change that jsbeautifier does without an option, and that is making sure the first paren after a function doesn't have a space before it, like so:
`function (`
becomes
`function(`

If this isn't a good way to go about resolving issue #46 please advise me upon an alternative :)