Make targeting of batch apply object endpoint configurable

Existing solution attempts to access the endpoint, and falls back to the
apply-object if it receives a 404 (ie, if the target node does not know
about the endpoint). This is fine, however this extra network call is
redundant, given we can provide all the information in the config.

Introduce the `enableBatchedRefs` boolean flag. When the flag is set
to true, invoke the batch-apply-object endpoint, otherwise (default
behaviour for backward compatibility) fall back to the apply-object
endpoint.

Bug: Issue 40015567
Change-Id: Idfaba2ede18adb7e5175990b156f617f83750570
7 files changed