Measure bytesize of strings as if encoded in UTF-8.

Previous implementation took the conservative estimate that every char is two bytes. While this may fit the JVM model, it violates user expectations that, for instance, base64-encoded binary files take 1 byte per character.

Adapted tests to new way of measuring String sizes.
5 files changed