Make Utils::convertTextWithUrl more error resilient
Summary:
Most notably, handle situations properly where the parens or brackets
aren't matched. This fixes some issues commonly seen in inline code
blocks.
Reviewers: dfaure, mlaurent
Differential Revision: https://phabricator.kde.org/D28860