fixing flush bug when we didn't have enough space in mmap buffer.
turns out hasCapacityFor() was incorrectly calculating how much the size will be;
it needed to take in to account the entire preEncBuffer size + incoming size,
not just size parameter alone.