Replaced the infinite schema tree by a cyclic DAG.

This is a necessary prerequisite to enable any kind of optimization of the validation algorithm. James Clarke mentions several ways to optimize his algorithm (see http://www.thaiopensource.com/relaxng/derivative.html#Optimizations), but they would all depend on the ability to share the schema nodes. With the infinite schema tree, even the equality is impossible to implement.