Handle invalid date for robustness

This PR can improve robustness for parsing mail that have invalid date in Date and Received header.

This PR can also fix #564.