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
Merge pull request #398 from danielhfrank/rpc-connect-timeout

Add default / configurable rpc connect timeout