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.
Simplify request generator call a bit
Merge pull request #36 from trustmaster/master

Request timeout and custom request generators.