Redo the horizontal compaction phase

I continue to come across new cases where the BK horizontal compaction
algorithm fails. Instead of trying to continue to patch it, I've
replaced it entirely with a simpler two-sweep DFS algorithm which works
for all of the failing cases I've tested.

Fixes #125
Fixes #158