Subzero. RAII NaCl Bundling.

This CL introduces the TargetLowering::AutoBundle type, which allows
RAII-style bundle emission. As part of the CL, all of the uses of
TargetLowering::_bundle_lock(), and TargetLowering::_bundle_unlock(),
were replaced with uses of the newly introduced type.

BUG=
R=sehr@chromium.org, stichnot@chromium.org

Review URL: https://codereview.chromium.org/1585843007 .
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp
index 477fe9f..6ca28ed 100644
--- a/src/IceTargetLoweringARM32.cpp
+++ b/src/IceTargetLoweringARM32.cpp
@@ -1771,7 +1771,6 @@
           CurInstr->setDeleted();
         }
       } else if (auto *StrInstr = llvm::dyn_cast<InstARM32Str>(CurInstr)) {
-        Sandboxer Bundle(this);
         if (OperandARM32Mem *LegalMem = Legalizer.legalizeMemOperand(
                 llvm::cast<OperandARM32Mem>(StrInstr->getSrc(1)))) {
           Sandboxer(this).str(llvm::cast<Variable>(CurInstr->getSrc(0)),
@@ -6193,17 +6192,9 @@
 
 TargetARM32::Sandboxer::Sandboxer(TargetARM32 *Target,
                                   InstBundleLock::Option BundleOption)
-    : Target(Target) {
-  if (Target->NeedSandboxing) {
-    Target->_bundle_lock(BundleOption);
-  }
-}
+    : Bundler(Target, BundleOption), Target(Target) {}
 
-TargetARM32::Sandboxer::~Sandboxer() {
-  if (Target->NeedSandboxing) {
-    Target->_bundle_unlock();
-  }
-}
+TargetARM32::Sandboxer::~Sandboxer() {}
 
 namespace {
 OperandARM32FlexImm *indirectBranchBicMask(Cfg *Func) {