For ENG-5088, fix some bugs in PersistentBinaryDeque and StreamBlockQueu...

...e

Stream block queue wasn't handling the scenario where some persisted buffers were pulled out of the PBD and then the in-memory buffers had to be synced.

The PBD was also not maintaining internal state correctly about what buffer to return next. We'll know more once we have the system tests running.