properly handle byte length of unicode string terms

Although Text terms were previously normalized before being memoized, String terms were not. This patch normalizes both prefixed and unprefixed String terms and adds a test for the functionality.