[modules] Switch from inferring owning modules based on source location to
inferring based on the current module at the point of creation.
This should result in no functional change except when building a preprocessed
module (or more generally when using #pragma clang module begin/end to switch
module in the middle of a file), in which case it allows us to correctly track
the owning module for declarations. We can't map from FileID to module in the
preprocessed module case, since all modules would have the same FileID.
There are still a couple of remaining places that try to infer a module from a
source location; I'll clean those up in follow-up changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303322
91177308-0d34-0410-b5e6-
96231b3b80d8