Block until the async operation is complete and return the object.
For a PJRTBuffer, waits for its computation or transfer.
For an array returned by as_array(x, await = FALSE),
waits for its transfer to the host and materializes the array. Any other R object is returned as is.