imap: fix typo
docs + cleanup
imap: make [Seq], [Uid], etc distinct types

Since we do not know at parsing time if some uint32's are seq. nos or
uids we need to convert among them.  This we can do using "%identity".
Making the types distinct helped catch a bug or two.