libfreerdp-codec: reorganize planar RLE encoding logic