Add a timestamp to the mail log.

This patch is loosely based on the one in bug #52126 but instead of
using a UNIX timestamp it uses the date format also being used by
error_log et al.
Add unit test for mail.log ini setting.
Merge branch 'PHP-5.5'