Clean ups for COMETD-565.

Using constants for the begin/end of message and restored
ServletOutputStream parameter to methods that write the messages.