emails: Mail_Parse detects bounce emails
Ticket thread supports specifying `thread-type`

This allows the email system to detect something like a bounce mail and
specify that the associated message should be an internal note.
emails: Add bounce detection for mail fetching
Remove bit-rotted code