Use text::tokenize instead of text::split

This avoids duplicating the memory used.
Fix crash when giving nil string to FFDocumentSearch
Fix potential out of range access
Use ‘char const*’ with scope_t::push_scope

This is to allow distinguishing between static and dynamic strings.
Don’t call scope_t::push_scope with empty scope attributes

Previously would be called with an empty string.
Add range check to scope atom parser
Add scope_t::empty and scope_t::size
Treat empty string as empty scope

Previously would be a scope with one empty “atom”.
Simplify scope::shared_prefix and scope_t::has_prefix

This is mainly for upcoming implementation changes.