Simplify & improve detection of same-page anchors

If you were on URL that has `#foo` and clicked on link that has simply
`#` as href, pjax wouldn't recognize it as same-page anchor and would
allow xhr request to be initiated.