Modules: Separate out a checkSignature helper, almost NFC
The main point is to move the delete-the-new-module logic into the same block
that creates it, so I can simplify the memory management in a follow-up, but I
think it's clearer to use use a checkSignature helper here anyway.
There is a minor functionality change: we now scan ahead to pull the signature
out of the control block *only* if this is a new ModuleFile. For old ones,
ASTReader::ReadControlBlock will have already read the signature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293393
91177308-0d34-0410-b5e6-
96231b3b80d8