Initialize the jsonrpc_request_retry global
Unnest sending logic
little fixes
retry forever (-1), retry never (0)