Refactor from QPair<int, QString> into a reasonable structure with named members
Enable webkit heuristic for RTL text

This change enables WebKit to employ the standard HTML5/CSS/Unicode heuristics
for determining the text direction of the paragraphs based on their content.

CCBUG: 327321