fix bug 834300 - attachments from ATTACHMENT_HOST

Only serve raw attachments when requested on the ATTACHMENT_HOST as configured
in constance.
(some) pep8 cleanup
move from constance to settings
Merge pull request #847 from groovecoder/attachment-host-834300

fix bug 834300 - attachments from ATTACHMENT_HOST