Code style + gjslint

- Fixed inconsistencies in code style and missing semicolons.
- Added `tools/gjslint.sh` for automated check of style consistency
- See also discussion below f3a7eb7