Refactor the serialization of serialization context in the MoarVM backend.

It makes it easier to monkey patch that part when cross-compiling.