port DataProviderIterator from yii-1

https://github.com/yiisoft/yii2/issues/2387