Implement scanner support for lists

IMAP uses parenthesized lists and the scanner should be able to parse
them. Add a list parser to the scanner. Nothing uses it right now, but
this will make it possible to implement support for several commands and
replies.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>