Fix attachments posted to pipe.php

- Handle decoding large base64 encoded attachments better
- Avoid transcoding from one charset to the same
- Avoid encoding attachments without a declared charset
Merge pull request #607 from greezybacon/issue/corrupt-piped-attachments

Fix attachments posted to pipe.php

Reviewed-By: Peter Rotich <peter@osticket.com>