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)?
Or 4. Always call getDeclarationDiagnostics in the semantic error phase? Shouldn't exported type using non-exported types always be an error?