Fix three problems in completion of IMAP mailbox names and listing of
the contents of IMAP containers:
1. Some IMAP servers refuse a pattern of `/%' for the LIST command, or
yield an empty list of results, so send `%' if we're examining the
root mailbox.
2. Some IMAP servers return the container itself that we're trying to
list the contents of, so filter that out if we see it.
3. Some IMAP servers hand out folder URLs and container URLs, so
canonicalize them appropriately in order that RUN-LIST-COMMAND may
return only folder URLs.