Support marshaling and unmarshaling strings with repeated encodings

When an encoding other than UTF-8 or US-ASCII is used, the encoding is
marshaled as a String, which means that the value can be reused via
the `LINK` type.

Closes #456