Unpack the files uploaded by staff on new ticket in the context of response

Staff uploaded files, on new ticket, were getting attached to message instead of
response.
fix: Make attachments unique per thread entry instead of the ticket thread

The bug prevented attachments from being sent out if it was previously
attached to the ticket - for example, you could resend a file to end user.
Merge pull request #688 from protich/issue/attachments

Fixup attachments attached to the response for new-ticket by staff

Reviewed-By: Jared Hancock <jared@osticket.com>