Add a server timeout for RPC queries.

See the comment in the code.