Homestyx hydra

R1:516ba5e6c56f

Fix an issue where generation of mail processing error email could fail in the presence of duplicate headers

Summary:
Ref T10121. If a user sends mail with duplicate headers, like:

```
X-Duplicate: A
X-Duplicate: B
```

...and we process it with `mail_handler.php`, we may end up with `array('A', 'B')` as the header value. When we try to write this back into an error response mail, it fails.

Test Plan:
- Generated a message with duplicate headers.
- Piped it into `mail_handler.php` with `--process…
Repository: R1 hydra
Commit Date: Jan 11 2016