Break out commit graph walking code in separate functions
Break out commit graph walking code in separate functions

The code for walking the commit graph, and for handling tags (which
are detected by the walk visiting zero objects), was a long spaghetti
mess. Break it out into separate functions for walking and handling
the two different types of tags.

saab-simc-admin/workflow-tools,saab-simc-admin/workflow-tools