[4.4] Apply custom changes to attachment.cgi

DO NOT COMMIT until Bugzilla has been upgraded to 4.4.

This file is an upstream copy of Bugzilla 4.4 code in
http://bzr.mozilla.org/bugzilla/4.4/view/head:/attachment.cgi
with our custom changes applied for
https://bugzilla.wikimedia.org/show_bug.cgi?id=54181

Change-Id: I9c609492b5d294eca6fcca61477f55e1de8e8b1b
Merge "[4.4] Apply custom changes to attachment.cgi"