Tweak stratification algorithm.

Previously, we computed the minimum legal strata for each relation, and then
placed every rule with that relation in its LHS in that strata. That is not
incorrect, but it is unnecessarily conservative. Consider a program like:

(r1) a <= b
(r2) a <= c.group(...)
(r3) c <= d

Clearly, r2 can only be evaluated after c has been completely determined, but we
needn't wait for c to be determined before evaluating r1. Hence, we can place r1
and r3 in stratum 0 and r2 in stratum 1.

Along the way, add a new builtin relation, t_rule_stratum, that contains the
stratum associated with each rule.