daemon: Allow rate to be specified in 'debug progress'.

There are now two forms of the 'debug progress' command:

(1) debug progress <n> (the original form) generates ordinary
rate-limited progress messages for <n> seconds.

(2) debug progress <n> <rate> generates progress messages every <rate>
microseconds for <n> seconds.

The second form omit the usual rate-limiting, and so wouldn't
be generated like this from an ordinary API call.  However this
is useful for testing events (see RHBZ#909624).
proto: Fix stack overflow when there are many progress events (RHBZ#909624).

Thanks: Eric Blake.
tests: Add a regression test for stack overflow in events (RHBZ#909624).

Note this is a check-slow test since generating 1,000,000 progress
events take a few minutes.