IMAP: treat numbers as string when strings are expected

The old code would sometimes try to be too optimistic when parsing bits which
looked like numbers even though they were not actually numbers -- e.g. a flag
named "333x666" would get parsed as two flags, the "333" and "x666". I suspect
this is one of the reasons why hand-written parsers using this pattern are
considered evil.

The only place which actually benefited from this directly-to-numbers approach
was the THREAD parsing, which now got switched to extracting the numbers from
QByteArrays.

REVIEW: 117186