update typescript to version 1.0 RC1

pull lib.d.ts out of the typescript.compile into its own file
fix bug with nested relative reference in ts files