rpc: refactor blocking query
rpc: refactor blocking query

To remove the TODO, and make it more readable.

In general this reduces the scope of variables, making them easier to reason about.
It also introduces more early returns so that we can see the flow from the structure
of the function.

hashicorp/consul,hashicorp/consul,hashicorp/consul,hashicorp/consul