Use HashDict to decode dictionaries

This leads to less confusability with the encoder's dispatch.
Add an encoder!
Fix tests for HashDict decode returns.
Fix roundtripping of dicts, as uncovered by tests.