Add Eq, Ord instances for Text.
Add encoder/decoder tests.