Return the result immediately if we run out of memory
Summary:
If we don't:
- we was a bunch of cpu because we'll be going over the entire list of
remaining messages to see if any fit (potentially over and over)
- we end up with out of order results (which is suppose should be
technically ok)
The only thing this change makes worse is that we potentially add
another roundtrip because we didn't include a smaller message that would
have still fit in the same batch.
Differential Revision: https://git.kolab.org/D1243