s3:rpc_client: don't mix layers and keep a reference to cli_state in the caller