When parsing what appears to be a date archive request, check for a post with a clashing permalink before resolving to the archive.
A URL like example.com/2015/05/15/
generally resolves to the May 15, 2015 date
archive. But in certain cases, it could also be the permalink of a post with
the slug '2015'
. When a conflict of this sort is detected, resolve to the post
instead of the archive.
URL conflicts of this sort should no longer occur for new posts; see [32647].
Props valendesigns, boonebgorges, Denis-de-Bernardy.
Fixes #5305.