mail_index_seq_array_lookup() didn't return idx_r correctly always, which could have caused out-of-order mail_index_update_ext() calls to break. We'll use bsearch_insert_pos() now instead of our own duplicated code.
mail_index_seq_array_lookup() didn't return idx_r correctly always, which
could have caused out-of-order mail_index_update_ext() calls to break. We'll
use bsearch_insert_pos() now instead of our own duplicated code.

damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot