Header ids

It's convenient to be able to scroll to a heading using a fragment tag. This patch adds an id attribute to generated headers.