SERVER-12438 better handling of batchSize and limit with sort
Merge remote-tracking branch 'upstream/master'