TextEditor: Optimize TextEditorOverlay::createSelectionPath

Change-Id: I9a0eca133a5a56fabab1ab51b91ca9db594a4f27
Reviewed-by: David Schulz <david.schulz@digia.com>