Rework DbalReader to reduce memory usage.

Also add several tests about iterator interface

For one of my projects, I needed to pull more than 30k records from db. With previous implementation, it was not working.

refs #66
This check is useless. The method description say it must be a string. And pass an empty query to this method is useless, too.