Ensured that headings inside divs get permalinks

In the ARIA spec there are many headings that are not part of a
section because they do not want section numbers, but they DO want
permalinks.  Allow permalinks on headers that are within a div where
the div or the header has an ID.
Fixes #315.