Fix Transaction constraint validation...

... for boot image extensions. Add WriteConstraint checks
to APUT instructions and add necessary WriteConstraint and
WriteValueConstraint checks to UnstartedRuntime.

For strict transactions (app compilation), prevent writing
to boot image objects. However, more work is required for
this use case as the UnstartedRuntime needs a review for
missing ReadConstraint checks and the WriteValueConstraint
may need to be more restrictive.

While the transaction_test is improved to test Transaction
constraints more thoroughly, no regression tests are
provided for the previously missing checks. Such tests are
difficult to write as they would require compilation of
a custom boot image.

Test: Manual; include java.lang.Locale[] in primary boot
      image by patching CompilerDriver::LoadImageClasses(),
          +  if (GetCompilerOptions().IsBootImage()) {
          +    image_classes->insert("[Ljava/util/Locale;");
          +  }
      , and build. This previously aborted in ImageWriter:
          Image object without assigned bin slot: \
          java.util.concurrent.ConcurrentHashMap$Node
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 119800099
Bug: 147596904
Change-Id: Ibfe1b24b10dbd982b4e4ae4d98289e587a842812
8 files changed