[SPARK-1341] [Streaming] Throttle BlockGenerator to limit rate of data consumption.

It is sometimes possible to get about one record more than expected. I made this check more strict in a new commit, but to avoid random failures, I still allow for some wiggle room in here.