Direct2D QPA: Speed up text rendering

After analysing text drawing performance two things seem to take up most
of the time. The first is font lookup, the second is QVector
initialization.

To address the first point a per paint engine instance font cache is
introduced. At the moment no mechanism exists to clear this cache and
it is unbounded.

To address the second point, we simply switch to using QVarLengthArray
instead of QVector.

In an artificial benchmark that draws text in a tight loop, the first
change raised fps from ~70 to ~100. The second change further raised this
number to ~115 fps.

Change-Id: Iafa25c3e35bc42bd7c1582b0636e721c5193b494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Direct2D QPA: Check Direct2D version

Since we require a relatively recent system, check the version of the
direct2d dll on disk and report an error to the user if it is too old.
Previously only a cryptic runtime error resulted from a direct2d version
that was too old.

Change-Id: I6c3955e1a98326fca6bcdc871b0a25291391ba88
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>