Add -noEmit compiler flag that skips the emit stage in ts.compile()

Fixes #1172

I'm not sure about the third commit. -out and -outDir are optional to begin with, and a lot of the other options also don't make sense when not emitting - -declaration, -emitBOM, -mapRoot, -module, -preserveConstEnums, -removeComments, -sourceMap, -sourceRoot, -watch. Should it check for all these parameters? Or just give -noEmit precedence and silently ignore them (i.e. just the first two commits)?
that means we will be doing the work twice. once to get the diagnostics and once to emit. the current model does this as we emit which saves us the extra pass.