Centralized URL hash management in the focus plugin and escaped uses of URL hash as selectors for jQuery objects

Fixes #6334