kew: Fix Closure annotations to match usage.

I added a "test" for kew.js, since I needed to write it to understand what the type annotations should be. Questionable parts of this change I'm happy to revert:

* Using typedefs: This makes the annotations somewhat Closure-specific, and maybe a bit harder to read. I'm happy to expand them manually.
* Adding a weird test: This file should compile. Ideally this shouldn't be needed, but I needed it to understand what the annotations should be. Happy to revert.