Use GStringChunk to store document words more efficiently

This is for document word completion. A `GStringChunk` makes less allocations than allocating for each string does, and may improve cache performance.