msg: reset ProtocolV2's frame assembler in appropriate thread
`set_is_rev1()` actually resets the internal state of `FrameAssembler`,
so -- to avoid racing -- it should be performed by the same thread that
takes care about executing `ProtocolV2::write_message()`.
```cppp
void set_is_rev1(bool is_rev1) {
m_descs.clear();
m_flags = 0;
m_is_rev1 = is_rev1;
}
```
See comments in the tracker for analysis.
Fixes: https://tracker.ceph.com/issues/55851
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit
c04256bab85ebf97daa8805daacdea17013381b7)