[mach-o] Refactor sections -> atoms to be table driven.

Previously each section kind had its own code to loop over the section and
parse it into atoms.  This refactoring has two tables.  The first maps sections
to ContentType.  The second maps ContentType to information on how to find
the atom boundaries.

A few bugs in test cases were discovered as part of the refactoring.
No change in functionality intended.