Fix raster graphics on X11 RGB30

The window surface incorrectly assumes that any pixel depth of 24 or
above would be on 8bit/color. This breaks 10bit/color formats like
RGB30. This patch instead make it specifically check for color depth 24
or 32 which are the two with 8bit/color.

Task-number: QTBUG-25998
Change-Id: Id0b7e07bdb64679f8c647158938da12efede9142
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>