Check bad dates and redirect, instead of 404ing, as necessary and appropriate. 
Adds query, conditional, and canonical Unit Tests.

Props kovshenin, SergeyBiryukov, DrewAPicture.
Fixes #10935.


Built from https://develop.svn.wordpress.org/trunk@25280


git-svn-id: http://core.svn.wordpress.org/trunk@25244 1a063a9b-81f0-0310-95a4-ce76da25c4cd