[NFC] Dedup code between tfrt_dht.set_tensor_with_constant_values and its sync variant.
[NFC] Dedup code between tfrt_dht.set_tensor_with_constant_values and its sync variant.

PiperOrigin-RevId: 437797239

tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime