Various fixes for typescript gulp module.

- Don't cache files that couldn't be read.
- Don't silently ignore some errors.
- Call typechecker while compiling, not while emitting.
- Simplify linker's handling of global namespace.
Updated typescript to v1.4.0

- Union types.
- Switched default lib to lib.es6.d.ts
Use fake source files to implement auto-generated JSDoc comments.
Implemented @implements annotations in JSDoc and documentation generator.
Use template strings.
Switched to in-development TypeScript compiler.
Use destructuring assignment and shorthand property names.