Detect whether NavPopups gadget is enabled before showing a hovercard
Before this change we only used to check whether NavPopups gadget is
enabled once per page load. The premise was that we could figure out
whether the gadget was enabled easily given the module name. Since
the gadget module name can be different on diffirent wikis, that
solution would not scale.
With this change we check whether the gadget is enabled before each
hover over an eligible link. We rely on the existence of the global
window.pg object. The existence of the object means that the
gadget is enabled, thus we do not show Hovercards.