Optimize memory usage of TextPool

The names `begin` and `end` imply indexes, but you are using them as offset and length.  I would change them back.