This branch adds support for marking messages as temporary. Temporary messages are deleted at the next startup (deleting them at shutdown wouldn't be reliable as we don't always shut down cleanly).
When creating a private message with attachments, the messaging client will mark the attachments as temporary until all attachments and the private message have been created, so that no stray attachments are left in the database if we shut down without completing the process.
Messages could alternatively be marked as temporary at the client layer with a metadata flag, but then deleting temporary messages at startup would require the client to iterate over its contact groups, doing a metadata query for each one. Since we eventually plan to add attachment support to other clients, which would increase the number of queries, I thought it was better to move this down to the database and delete all temporary messages with a single query.
Part of #1585 (closed).