[framework] refactor "twig.extension.text" service

closes #126