Better handle re-queued and forwarded messages

Prevented duplication of entries in message table for re-queued and
forwarded messages. Handled forwarded messages even if image files have
been deleted from the plugins image subdirectory. We’ve also set the
image subdirectory to be cleaned out when it contains more than 2 MB
worth of files.