[snapshot] Save if IOStream has |m_buf| set

IOStream uses |m_buf| as a buffer pointer and as a flag at the
same time: if it's not set then there's no need to flush.
Previous snapshotting code didn't save this bit of information,
so next time one tried to allocate a buffer from a just loaded
empty IOStream, it thought it's not empty (as |m_buf| was not
nullptr) and tried to flush garbage.

This CL saves this separately, so now |m_buf| after snapshot
loading is exactly in the same state as it was before.

Bug=b/36700704

Change-Id: I7af309bb1d3c16ba20969f7bb3f9bfc067d0051d
1 file changed
tree: 06fd62c0e50c92c477f98f7ee762c275e27d7099
  1. android/
  2. host/
  3. .gitignore