Add auto-genned ids to all issues in the spec. These are stable against changes outside the issue, but shift if you change the issue.
Move header self-links to a separate function, add issue self-links.
Make heading functions only run on headers that haven't been processed yet.