Revert "SERVER-13760 Do not call dateToISOString if date is not formatable"

This reverts commit 3b97c0870427f676cf3ffbddabc5df8b1fa44fa5.
Merge remote-tracking branch 'upstream/master'