move lib/text to core/text. add tests

Merged kk requested to merge core_text into master

Merge request reports