refactored out state changes into methods to simplify read the next method
refactored out state changes into methods to simplify read the next method

mongodb-js/mongodb-core,andrasq/mongodb-core,yurynix/mongodb-core,christkv/mongodb-core,ofrobots/mongodb-core,christkv/mongodb-core,andrasq/mongodb-core,mongodb-js/mongodb-core