libfreerdp-codec: improve freerdp_icon_convert ICO reader

freerdp_icon_convert reads ICO data, which is used by RAIL for
window and notify icons. The old implementation incorrectly iterpreted
the green channel, flipped the alpha channel, and ignored alpha padding.

This implementation is much more robust and correctly handles the alpha
channel, even for non-powers-of-two image widths.

Fixes #578.