Make sure no Date constructor is used in tests

This is step one for deprecating the Date constructor. First merge #1564 to get the deprecate function and actually deprecate the newly extracted function so it'd print a warning if moment construction hits `Date`.