Go encoder: implement proper error checking
Go encoder: use recursion instead of double type casting

Profiling shows that type casting is quite expensive operation.
So it's faster to recurse in case of encode() receives reflect.Value.
Speed got improved by about 10%.
Go encoder: some code cleanup
Go encoder: encodeBytes() should dedup not only small strings