Update folding to match HTML folding behavior

Update folding to collapse sections (and render those collapsed
sections) the same way as HTML.  Also add tests for HbFoldingBuilder.
Merge pull request #38 from dmarcotte/update-folding

Update folding to match HTML folding behavior