Turn headers into anchors / links

Implements and closes #308.