Refactor.
Fix minor issue with non-sequential headings.

That is, for example an <h3> following an <h1> directly. In this case,
the place of the missing <h2> should be the navigation dict for the <h1>.
Merge pull request #34 from malthe/fix-get-menu-with-non-sequential-headings

Fix get menu with non sequential headings