Unwind protect repo mode change

Otherwise, on test failure, the test repo cannot be deleted.
Make levels of comment headings consistent
Add page breaks
Update for recent Magit changes

The magit-section-action changes are from Magit commits 096f1ce and
d05e2d8, and the magit-section-info changes are from 7f58159.