Optimize usage of the chars of a string

* The first commit, on `html_escape`, improves nitdoc execution on RnR by about 10s, or 6%.
* The second commit _theorically_ improves access to the chars of strings. It _worsen_ the execution of nitdoc on RnR by about 9s.

The overall gain on this specific use case is of 1s. Obviously this PR is not to be merged as is!