[Modules] Don't infinite recurse  on implicit import of circular modules in preamble

Update the Preprocessor's VisibleModuleSet when typo-correction creates
an implicit module import so that we won't accidentally write an invalid
SourceLocation into the preamble AST.  This would later lead to infinite
recursion when loading the preamble AST because we use the value in
ImportLocs to prevent visiting a module twice.

rdar://problem/24440990

llvm-svn: 260543
diff --git a/clang/test/Index/Inputs/preamble-with-implicit-import-C.h b/clang/test/Index/Inputs/preamble-with-implicit-import-C.h
new file mode 100644
index 0000000..a3fc1d4
--- /dev/null
+++ b/clang/test/Index/Inputs/preamble-with-implicit-import-C.h
@@ -0,0 +1,2 @@
+#pragma once
+#include "preamble-with-implicit-import-B.h" // Circular