Implement RFC5987 for fetched attachments

Previously, filenames specified in email headers fetched using the PHP imap
extension were not decoded properly. Specifically, if RFC5987 was used to
encode the filenames, no decoding was performed at all.

This patch properly detects the filename attribute, using a decoding scheme
for RFC5987 if the attribute was encoded properly.

References:
http://osticket.com/forums/showthread.php?t=6129
Merge pull request #738 from greezybacon/issue/fetch-attachment-filename

Implement RFC5987 for fetched attachments

Reviewed-By: Peter Rotich <peter@osticket.com>