CDK-177: Adding better tests for Constraints.

This adds some more thorough testing for the Constraints class that
covers how constraints are merged and what the underlying predicates
match.