libfreerdp-codec: cleanup and fix XCrush context flush synchronization