closes #4626 issues and prs share ticket numbers, so opening one under the wrong url now redirects to the right page instead of showing “not found.”
- issue urls pointing to prs redirect to the latest pr version
- pr urls pointing to issues redirect to the issue page
- query params are preserved
- missing tickets still return 404, and correct urls work as before
added regression tests for redirects and lookup failures