more autoconf updates
trying to be a better autoconf citizen

by getting rid of convoluted logic in Makefiles
IMAP: fix broken SELECT/EXAMINE unseen response