Bug 850534: Various Yarr performance improvements, r=dmandelin