For ENG-5345, failed to flip buffer containing serialized data before counting how many bytes are being discarded causing permanent backpressure
(cherry picked from commit f569e1f870e5ee2b2107b16fd9cead4275490ccb)
For ENG-5345 don't use crashLocalVoltDB for assertions
(cherry picked from commit a8d826c563fc6e65034f3587ce83e65b70a24215)
For ENG-5345, also account for bytes released from current write buffer
(cherry picked from commit 12eddfa4fa384b4b6dd25615b8ada21d7a8336e7)
V4.0.2.2