Rework testsuite to be section order agnostic

In Python 2.6, SafeConfigParser defaults to "dict", which
does not preserve section order. The testsuite was expecting
insertion order to be preserved, which is the case with
Python 2.7. According to Clint Byrum the actual code does
not worry about section ordering, so I reworked the tests
to sort sections into a welldefined order and run tests
then, which makes it pass for all Python versions.

Change-Id: Ia4e14018ae70c465b0b56d406d29fbb3c2ea280c