Do not abort if we fail to allocate a thread-peer on shutdown

We were aborting if we failed to allocate the "Shutdown thread" a
java-peer. This can sometimes happen if there is very constrained
memory during shutdown for some reason. Since the thread-peer is only
observable in very rare situations (and the runtime is shutting down
anyway) we will instead simply continue without it.

We also change a test that was hitting this situation to handle not
having a thread peer.

Bug: 71623806

Test: while ./test/run-test --host \
                            --prebuild \
                            --compact-dex-level none \
                            --optimizing \
                            --no-relocate \
                            --runtime-option -Xcheck:jni \
                            --pic-test \
                            --64 \
                            --build-with-javac-dx \
                            004-ThreadStress;
      do; done
Test: ./test.py --host -j50
Change-Id: Ib159d03e9f4b0e4d5b1b071d4b85e94620679bb0
2 files changed