Add 'get' method to graph to similar main() code

The Graph's API should be able to handle this case rather than the
caller of the Graph having to do the work.
Attempt slightly smarter graph walking

Instead of just going backwards through the visited nodes we attempt to
build a graph of the visited nodes and navigate that.

It is more than a little hacky and the moment and not well tested but it
is a start.
Fixup use of values instead of items

I misremembered.
Add a recursive 'changed' check

We don't want to write out new commits for commits which haven't
changed. We implement a check to see if a node has any overrides or if
its parents have changed at all. If a parent has changed then the node
has changed by default.

It is expensive to keep tracking back over the network for every single
node. We should cache it somewhere but not on the node itself for the
moment. Probably in the write method of the graph somehow.
Merge branch 'walk'
Switch from hard coded message to a tempfile

We fill in the tempfile with the previous commit message to allow users
to edit it.

We should probably switch to use COMMIT_EDITMSG file that git
traditionally uses for this.
Switch to using COMMIT_EDITMSG file that git does

Instead of our own temp file.
Switch to a single parents array

Instead of having touched and untouched parents we combine them into a
single or ordered dictionary and start off the parents as ReferenceNodes
that don't need to be written and replace any of them that we hit in the
graph walking with actual Node instances.

We use an OrderedDict so that the parents order is maintained (which was
a problem with separate arrays) and we use a dict-type instead of a
list-type so that it is easy to replace the ReferenceNodes with actual
Nodes when needed.
Merge branch 'edit'