Code a value into a string.
This function takes a value, and converts it to a string. This string
can then be saved, sent to another Pike process, packed or used in
any way you like. When you want your value back you simply send this
string to decode_value() and it will return the value you encoded.
Almost any value can be coded, mappings, floats, arrays, circular
structures etc.
If codec is specified, it's used as the codec for the decode.
If no codec is specified, the current master object will be used.
If codec ->nameof(o)
returns UNDEFINED for an
object, val = o->encode_object(o)
will be called. The
returned value will be passed to o->decode_object(o, val)
when the object is decoded.