libfreerdp-codec: fix and enhance cursor image conversion