cifs: refactor mid finding loop in cifs_demultiplex_thread