Update `redirect_canonical()` to account for custom pagination and URL format used by sitemaps in order to follow standard practices. Introduce the function `get_sitemap_url()` to simplify getting the index and provider URLs as needed. Props jonathanstegall, pbiron, GamerZ, salvoaranzulla, peterwilsoncc. Merges [48872] to the 5.5 branch. Fixes #50910. git-svn-id: https://develop.svn.wordpress.org/branches/5.5@48873 602fd350-edb4-49c9-b593-d223f7449a82