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](http://osticket.com/forums/showthread.php?t=6129)