Use new (std::nothrow) throughout

If code uses "normal" `new`, the compiler is allowed to assume that
`nullptr` is never returned, even if built with -fno-exceptions.

Use `new (std::nothrow)` throughout so that `nullptr` gets returned
and can (in some cases) be handled.

Bug: 215451239
Test: VtsAidlKeyMintTargetTest
Ignore-AOSP-First: Cherry pick from AOSP
Change-Id: Ied97ce946c0fbfbd5449c533e7ce1acbd0f595c5
(cherry picked from commit b80ef359b047a6bb72947b582102a979568f5c30)
diff --git a/ng/AndroidRemotelyProvisionedComponentDevice.cpp b/ng/AndroidRemotelyProvisionedComponentDevice.cpp
index e6bd40f..0c2d842 100644
--- a/ng/AndroidRemotelyProvisionedComponentDevice.cpp
+++ b/ng/AndroidRemotelyProvisionedComponentDevice.cpp
@@ -112,7 +112,7 @@
     GenerateCsrRequest request(impl_->message_version());
     request.test_mode = testMode;
     request.num_keys = keysToSign.size();
-    request.keys_to_sign_array = new KeymasterBlob[keysToSign.size()];
+    request.keys_to_sign_array = new (std::nothrow) KeymasterBlob[keysToSign.size()];
     for (size_t i = 0; i < keysToSign.size(); i++) {
         request.SetKeyToSign(i, keysToSign[i].macedKey.data(), keysToSign[i].macedKey.size());
     }