Fixing indent level when it undergoes non-incrementing changes.

I tend to write documents like this:

 # Topic
 ## Subtopic
 ### Now getting into some detail
 # New topic

Currently toc.js renders this as

 1.  Topic
    1.  Subtopic
        1.  Now getting into some detail
    2.  New topic

Whereas my desired rendering is

 1.  Topic
    1.  Subtopic
        1.  Now getting into some detail
 2.  New topic

This patch causes toc.js to take my <h> tags more seriously, so if I go from <h3> to <h1> I drop all the way out to the root level.