Shared test setup utilities for text-document crate tests.
Provides helpers to create an in-memory document with content,
export text, and traverse the entity tree — eliminating the need
for each feature crate to depend on direct_access and document_io
in its dev-dependencies.