mfreerdp: rewrite and update clipboard code