Do not force a direction before we know it

WebCore does not calculate the text direction when calculating widths
the best we can do here is let the shaper guess the direction. Forcing
it to the default LTR breaks HarfbuzzNG on Arabic scripts.

Since the default HarfBuzz engine changed in 5.4, this was a regression
from 5.3.

See also https://bugs.webkit.org/show_bug.cgi?id=101440

Task-number: QTBUG-41450
Change-Id: Ia324c8e5ebd1744ce2dfaea94d5046ef1f77b483
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Clear a stray ref on layers when purging GL resources

Fix a regression of 3df57f7e550a19cb4450ed3896aa51ddb38c2ed2 where
a reference to TextureMapperBackingStore would be kept in the
TextureMapperLayers after purgeGLResources(). This would crash later
on if the window would get destroyed before the
CoordinatedGraphicsScene that own those layers.

Task-number: QTBUG-40734
Change-Id: Id1a596c0f0ba9afd1e163f83c38dda939f521314
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: I3df74c8b47ff6e3d668f8b2126e6145670327d73