Factorize method rdp_input_invalidate of mod_rdp class with RefreshRectPDU class.