Hyphenated class names (now with URL backwards compatibility!)

This continues the work from #487, allowing for hyphen characters in class names (and guides). It includes the same changes as in that pull request, though the commits have been rebased on master and amended to clarify which changes affect guide names and class names. It also preserves backwards-compatibility with old URLs. Sorry for the long delay getting this to you!