mount: Refactor code creating CLTOCS_WRITE message

Refactor code creating CLTOCS_WRITE message using the new serialization
framework. This commit doesn't chagne the behavior of the system, it's
just an example of using the new functions.