Do not emit references in generated declaration files if the --noresolve flag was set. This fixes a crash in the compiler when generating declarations with /// reference and noResolve
add negative test for invalid references and declaration emit
respond to code review remarks and reverted tryResolveScriptReference to resolveScriptReference
Merge branch 'master' into emitDeclarationWithNoResolve
Merge pull request #599 from Microsoft/emitDeclarationWithNoResolve

Do not emit references in generated declaration files if the --noresolve flag was set