imap: fix sequential fetching
The current implementation of sequential fetching is buggy.
Right now, each fetch returns only one message, while it should work as a truncated list.
12 UID fetch 3:* (FLAGS)
should return mailbox.messages[4:]
(from redmine: created on 2013-05-14, relates #4607 (closed))