jscs style check and cleanup

 - Enable jscs for `lib`, fix style violations
 - Gruntfile: add `jshint` and `jscs` as deps of `grunt test`
 - Gruntfile: temporarily disable checks of `test` scripts
 - lib: fix remaining style issues

This PR obsoletes #714.

/cc @raymondfeng @ritch @fabien I'll land this PR without your review. Let me know if you have any objections against any of the style checks, we can tweak jscs settings in a follow-up pull requests.

/cc @rhalff