Remove every uses of getGlobalContext() in LLVM (but the C API)

At the same time, fixes InstructionsTest::CastInst unittest: yes
you can leave the IR in an invalid state and exit when you don't
destroy the context (like the global one), no longer now.

This is the first part of http://reviews.llvm.org/D19094

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266379
diff --git a/llvm/unittests/Transforms/Utils/MemorySSA.cpp b/llvm/unittests/Transforms/Utils/MemorySSA.cpp
index 48bbe47..ceee21a 100644
--- a/llvm/unittests/Transforms/Utils/MemorySSA.cpp
+++ b/llvm/unittests/Transforms/Utils/MemorySSA.cpp
@@ -20,7 +20,7 @@
 using namespace llvm;
 
 TEST(MemorySSA, RemoveMemoryAccess) {
-  LLVMContext &C(getGlobalContext());
+  LLVMContext C;
   std::unique_ptr<Module> M(new Module("Remove memory access", C));
   IRBuilder<> B(C);
   DataLayout DL("e-i64:64-f80:128-n8:16:32:64-S128");