Revert "Sanitize the `string` implementation."

This reverts commit 0144c4cbc8f8dbad09c83b4b4f4aae89657a0df5.
Revert "Clean up the `string` implementation."

This reverts commit ef79c686a04b665832528968a4fcb87de6c7b9db.
Hopefully an actually sane `string` implementation this time.

We now measure in codepoints but still manually pick characters
out of the input data. This results in much nicer error messages
and less atrocious code.