Use ts-compiler for TypeScript compilation.

- Avoids use of child processes
- Avoids use of temp files
- Added StringReader class for converting string to stream
Update definitions.
Use OutputFileType enum from api.
Merge branch 'ts-compiler'

Switch to 'ts-compiler' package for compilation, rather than spawning a
child process for 'tsc'.