Fix drawCachedGlyphs on RGBA8888

drawCachedGlyphs draws with the wrong color on RGBA8888. The issue
is that the draw routines bitmapblit_quint32 and alphamapblit_quint32
while safe to use on rgba formats, needs to have the input color
converted.

This patch adds small wrapper functions for bitmapblit and alphamapblit
that converts the formats. Two tests are extended to ensure we have
test coverage.

Change-Id: I5f99f3795eba46a69d4df5b167e6099024e9a060
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
CSS parser: fix the pseudo-classes array length

The pseudoclass array is declared with length "NumPseudos - 1",
but the declaration has actually 44 elements, not 45.

This caused a zero-initialized last element to be silently appended
to the array. The zero-initialized element broke the sorting
of the array, which in turn broke std::lower_bound usage
(although of course the problem was there from before switching
to the standard library algorithms).

Task-number: QTBUG-36933
Change-Id: I8a02891fc36761b6ae72d15a0a8d6c6a96813947
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Cocoa Menu: Set keyboard modifiers when item is activated

Seems to be a regression from 4.8, which is not surprising
since everything was rewritten for QPA.

Task-number: QTBUG-36851
Change-Id: If89f8c9e6897fd1e02800f49e51baeb1ea181238
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Cocoa Menus: Give platform menu ownership back to QWidgets

We don't want to be in the situation where a QCocoaMenuItem
owns a QCocoaMenu (because that item is a submenu), and then
the actual QMenu "sees" that same QCocoaMenu being deleted.

Instead, since all the QCocoaMenu* classes inherit QObject,
we rely on meta-object properties to set the hierarchy and
climb the hierarchy when guessing the menu item's role.

This ammends most of commit 370e89f06465a4d61c7b.

Task-number: QTBUG-36785
Change-Id: I0e03acb593e93061c8c6c1fdd161669cf0d2a293
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>