[API Notes] Enable support for overriding the types of declarations.

Lazily parse the types provided in API notes, and apply them to the
AST. The lazy parsing is handled via a callback from Sema into the
Parser, which parses the type in the current context. We perform some
simplistic sanity checking (e.g., the size of the replacement type is
the same as the original type), but otherwise this is a dangerous
power tool that will need to be used carefully.

The specific API notes features this enables are making use of the
'Type' field property/global variable/parameter API notes and the
'ResultType' field of method and function API notes.

Finishes rdar://problem/28943642.

(cherry picked from commit 4aa4c8bd93b23c4f83ae954a9f187b7c3bdd2b40)
17 files changed