closes #1116 Conflicts: lib/querystream.js test/model.stream.test.js
closes #1123 on 2.x
mongodb 2.2 support closes #1091
thought it always was. with my testing it seems this is the ideal size but this wasn't a scientific excersise. streaming > 104000 records caused serious slowdown in v8 which raised this issue in the first place.
fix streams prematurely dying properly handles pause/resume within getMore prevent data events emitted after close closes #1092
Issue is that the call to done in _populate is synchronous if subobj[key] is an empty array This means that in the case you have multiple elements in obj[i], you get superfluous calls to next() which screws up everything (must be called once per property) This patch ensures that next won't be called in the synchronous path. The call to next in this case is yelded to the if(0 === total) at the end of the block