[frontend] Make -chain-include work when used with modules.
[Modules] Fix an issue where the reconstructed redeclaration chain was incomplete, missing the definition from a module.

-Make sure that a deserialized external decl gets added to the TU scope.
-When associating an identifier with a set of decls, use the most recent local ones,
  if they exist, otherwise associating decls from modules (that came after a local one)
  will lead to an incomplete reconstructed re-declaration chain.

rdar://13712705
[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.

The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.