go: only dedup strings for hash keys and class names.

This gives ~2% speed up on string-heavy data, but is also more correct.
go: remove some branches from looping over maps and arrays

This also forces map keys to be strings in Perl compat mode.  We will
panic if this is not the case.
go: remove an extra recursive call when encoding interfaces

This is a ~10% speedup.