dag: Improve the graph layout algorithm
Walk the nodes from parent to children so that the nodes have
a stronger tendency to stay left-aligned.
Special-case the single-parent case to favor aligning nodes
relative to their parents.
What's really nice is that merges pull nodes towards the left which
is exactly what you'd expect ("merging features into master")
when visualizing branchy histories.
The previous algorithm basically did this in the reverse
order and caused branches to diverge more along the X axis
due to the order of traversal.
Signed-off-by: David Aguilar <davvid@gmail.com>