Request timeout and custom request generators.

Added the following advanced settings to both API and command-line
tool:

- Per-request `timeout` in milliseconds, because earlier all requests
  were automatically cancelled after 3000 milliseconds.
- Custom request generator function useful to generate dynamic
  requests asynchronously.