Several fixes to support latest versions of node.

* Added missing event to QueryStreamWrapper.
* Added support to resume importer from the last batch group.