minor heading-link tweaks

- use id instead of name
- replace spaces with `_`

for html compliance
tweak heading-anchor css

avoids blue links after visiting
Merge pull request #3143 from minrk/heading-fixup

minor heading-link tweaks