force decoding attachments as base64 in case they were saved incorrectly

http://manage.dimagi.com/default.asp?144906
remove unused imports

[ci skip]
Merge pull request #4684 from dimagi/pact-fun-2

force decoding attachments as base64 in case they were saved incorrectly