Add an explicit step for flattening ordered graphs

Things were getting pretty muddled in the data model, so I spent some
time pulling things apart, and instead of flattening during the
ordering phase, I decided to explicitly flatten ordered graphs in
a separate step, between ordering and making the block graphs. This
will have benefits for the block graph, because there was a bug in
my initial implementation, where an edge wouldn't be shifted down
by a node that was above it, because I wasn't accounting for edges
in blocks. Now that we have Segments (essentially Edges + a layer id),
I can use those in blocks and avoid this problem.