Fix a bug in the stratification code

The strongly-connected components in the relation dependency graph were
being processed in the wrong order.  This meant that not all of the
dependencies of a given relation were assigned their number before the
relation was assigned its number.  This put relations that should have
been evaluated last early in the evaluation order, leading to missing
results.
Add a missing Show instance
Add a missing Show instance
Remove some debugging output