[This is preliminary documentation and is subject to change.]
Writes Messages to a stream.
Remarks
The messages are written in the same format used by the other
methods in this class, and so the stream can be read by the TreeDeserialiser class. NB: This method should
not be called more than once on the same stream.