Fix attachment mishap in outgoing emails

The detection of inline images in the mail processor causes inline images to
be removed from the attachment list, if listed there. However, the
attachments in the attachment list were not keyed by the attachment-id, so
there was no proper way to detect and remove the attachments from the list.

This patch properly keys the attachment list by the attachment file_id
Merge pull request #175 from greezybacon/issue/159

Fix attachment mishap in outgoing emails

Reviewed-By: Peter Rotich <peter@osticket.com>