Add utf8 utility functions from old stdlib.

These help index strings by their utf8 code points rather than
the default way of doing it (by byte). We essentially need to
move "character by character," and this helps enables that."