[RosyWriter] Fix race wrt CMSampleBuffer usage. Update sample to be closer to the original (e.g. missing audio dispatch queue) and make it a bit more C#ish. Fix [#5997]