Add serializer and deserializer of the IR.

To test them, GenJSCode currently does the stupid job of
serializing its IR and deserializing it before desugaring and
actual code emission.