imap: use common field types plus appadmin support

- Fixes issue 1731
- Fixes an issue with imap insert default datetime
- Adds step variable to appadmin select action (100 by default or 3 if it finds an imap db). Required for slow remote queries. Note: appadmin could also set the pagination step with user input.
- Adds fields list for appadmin select action (filtered for imap dbs). Required for faster queries and because some message contents can raise sqlform decoding errors.
- Allows imap insert and update with appadmin