help: Fix broken anchor link scrolling in documentation pages.
help: Fix broken anchor link scrolling in documentation pages.

Whenever a link is clicked, the page link changes, and the content
of the `.markdown .content` node updates, preventing the old
listener to catch any future anchor link clicks. 

We attach the listener to the document instead and only activate
it when the target element is a proper anchor link heading.

Fixes #9767.

andersk/zulip,jackrzhang/zulip,hackerkid/zulip,zulip/zulip,timabbott/zulip,rht/zulip,brainwane/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,hackerkid/zulip,rishig/zulip,eeshangarg/zulip,dhcrzf/zulip,punchagan/zulip,shubhamdhama/zulip,tommyip/zulip,zulip/zulip,kou/zulip,zulip/zulip,brainwane/zulip,hackerkid/zulip,eeshangarg/zulip,showell/zulip,dhcrzf/zulip,showell/zulip,eeshangarg/zulip,brainwane/zulip,brainwane/zulip,synicalsyntax/zulip,andersk/zulip,synicalsyntax/zulip,dhcrzf/zulip,jackrzhang/zulip,shubhamdhama/zulip,andersk/zulip,zulip/zulip,synicalsyntax/zulip,dhcrzf/zulip,timabbott/zulip,zulip/zulip,rht/zulip,timabbott/zulip,eeshangarg/zulip,timabbott/zulip,zulip/zulip,brainwane/zulip,rht/zulip,andersk/zulip,brainwane/zulip,rishig/zulip,jackrzhang/zulip,shubhamdhama/zulip,eeshangarg/zulip,rht/zulip,rht/zulip,kou/zulip,hackerkid/zulip,rishig/zulip,tommyip/zulip,showell/zulip,kou/zulip,shubhamdhama/zulip,kou/zulip,dhcrzf/zulip,kou/zulip,punchagan/zulip,zulip/zulip,rht/zulip,tommyip/zulip,rishig/zulip,rht/zulip,timabbott/zulip,tommyip/zulip,synicalsyntax/zulip,jackrzhang/zulip,showell/zulip,synicalsyntax/zulip,hackerkid/zulip,timabbott/zulip,shubhamdhama/zulip,eeshangarg/zulip,shubhamdhama/zulip,tommyip/zulip,timabbott/zulip,punchagan/zulip,showell/zulip,showell/zulip,dhcrzf/zulip,showell/zulip,jackrzhang/zulip,punchagan/zulip,punchagan/zulip,andersk/zulip,rishig/zulip,hackerkid/zulip,kou/zulip,jackrzhang/zulip,andersk/zulip,dhcrzf/zulip,tommyip/zulip,jackrzhang/zulip,shubhamdhama/zulip,synicalsyntax/zulip,andersk/zulip,brainwane/zulip,tommyip/zulip,eeshangarg/zulip,synicalsyntax/zulip,rishig/zulip,rishig/zulip,punchagan/zulip