Replace the message-update code with direct-to-database updating for
performance reasons.  Also change the return to better match the ideas
behind the trash_messages and archive_messages calls so that the UI can
use the ID list to remove stuff from its display directly, should the UI
ever start using this call.