[IMAPx] Incorrect mailbox used for untagged OK/NO/BAD with pending SELECT

With a pending SELECT command a closing mailbox was used as the one
to which untagged OK/NO/BAD responses might belong, but it was not
correct, because for example UIDVALIDITY response belongs to the mailbox
which was pending the selection. This misinterpretation caused incorrect
offline cache clean ups.

I guess this also fixes bug 691523, but I only guess it.