Revert^2 "Compile time null checks for VarHandle intrinsics."

This reverts commit 4a889b7f1e58368f0ffd795eaa24f2f493ccab8d.

Reason for revert: relanding the original change after fixing the
  baseline compiler.

Static checks for VarHandle intrinsics are now done in two places:

 1) Simple static checks are done for both baseline and optimizing
    compilers in `HInstructionBuilder::BuildInvokePolymorphic`.

 2) More complex checks are done in instruction simplifier only for the
    optimizing compiler. They can use information provided by preceding
    optimization passes.

Bug: 191765508
Test: art/test.py --host -r
Change-Id: I92932f6fcf408c700e6db0101fe2fb1e8300a54a
diff --git a/compiler/optimizing/intrinsics.h b/compiler/optimizing/intrinsics.h
index 62b5faa..9bc8c51 100644
--- a/compiler/optimizing/intrinsics.h
+++ b/compiler/optimizing/intrinsics.h
@@ -224,6 +224,14 @@
   DISALLOW_COPY_AND_ASSIGN(SystemArrayCopyOptimizations);
 };
 
+class VarHandleOptimizations : public IntrinsicOptimizations {
+ public:
+  explicit VarHandleOptimizations(HInvoke* invoke) : IntrinsicOptimizations(invoke) {}
+
+  INTRINSIC_OPTIMIZATION(DoNotIntrinsify, 0);  // One of the checks is statically known to fail.
+  INTRINSIC_OPTIMIZATION(SkipObjectNullCheck, 1);  // Not applicable for static fields.
+};
+
 #undef INTRISIC_OPTIMIZATION
 
 //