Create minimal pools from engine in migrations.
Remove unused ImapThread method.

Pretty sure this snuck in because I started some code that Karim finished.
Fix NoResultFound error in add_new_imapuid