Add support for hardware ARGB cursors up to 32x32 size

Actually they are converted to 32x32 with 256 color palette. In the
case if we have more than 256 unique colors, the color components
of the pixels are reduced from 8-bit to 7-bit, then to 6-bit if
necessary and so on (until we reduce the number of unique colors
so that they can fit the palette). In the worst case we may
theoretically end up with just 2 bits per A, R, G and B channels,
but in practice 7 or 6 bits seem to be enough.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>