Optimisation: Respect closure compiler type annotations / JS Doc fixes

- fixed a couple of formal errors, i.e. often there was something like `{Object, String}` instead of  `{(object|string)}` in the type hint, the variable name was mispelled or left out
- added a couple of missing `@params` to complete existing function doc blocks
- explicitely fixed annotations to use the type hint formats listed at https://developers.google.com/closure/compiler/docs/js-for-compiler (which are a subset of the official JSDOC spec).