Display and add attachments in alphabetical order by name

Without any sorting, the ordering is random and determined by Perl's
internal hash key/value ordering.  While preserving upload order would
probably be best for the cases touched in this commit, it would require
a more invasive or hackish change not suitable for the 4.0 series.

We already display attachments in alphabetical order in the ticket
metadata.  Extend that same consistent ordering to the attachments list
during ticket create/update and when adding the attachments to the
create/update MIME entity.
Merge branch '4.0/attachment-ordering' into 4.0-trunk