InputTestDriver sleeps exactly until input loop emits all the test data

In order to avoid sleeping long, specify expected emits and then
InputTestDriver continuously sleeps very short so that input loop will emit all the test data.

`expected_emits_lengths` seems good for high rate traffic tests, which checks a number of records only:
```ruby
d.expected_emits_length = 3000

d.run do
  3000.times do |i|
    d.emit({"num" => i}, Time.now)
  end
end

assert_equal 3000, d.emits
```