Rate-limit & retry requests

This implements a request queue so that requests are only ever performed at a
configured maximum rate.