IMAP: fix QRESYNC when the mailbox was previously empty

The code must know that QRESYNC was issued, otherwise it (correctly) refuses to
deal with FETCH messages which attempt to reference the "unknown" messages.

Thansk to Stephan Platz (paalsteek on IRC) for an excellent report.