Work around access restriction for image attachments

File is a 1:1 copy of upstream file at
http://bzr.mozilla.org/bugzilla/4.2/view/head:/attachment.cgi
and has an additional custom section marked with
"# WMF hack for bug 54181"

Thanks to Brion Vibber for code.

Bug: 54181
Bug: 51839
Change-Id: If746a014e30d7e4eeea6ceac0b8228bf89ac5602
Merge "Work around access restriction for image attachments"