Add default / configurable rpc connect timeout

Without this timeout, it was possible for rpc connections
(for example, reporting that a task was done) to hang forever