Only recognize URIs with balanced parentheses
To prevent URIs inside parentheses from getting extended to the closing parenthesis, only recognize URIs with balanced parentheses in regname, path, query and/or fragment. We still allow unbalanced parenthesis in userInfo, since the postfix @ should prevent most ambiguous situations, and the parenthesis can be part of a password.