Refactored constraint system: Constraints are now self-contained classes - no more need for the registry.
This should simplify (de)serialization of constraints (because this way we don't have to worry about how to serialize the registry).