Clean up Constraints imports.
CDK_177: Move predicates out of Constraints.

Also, clean up TimeDomain key range support, included by a git accident.
CDK-177: Clean up constraints, add docs.

This makes Constraints more independent from the rest of the code.
Constraints now maintains a set of predicates and has accessor methods
that use those predicates. Constraints now returns an entity Predicate
rather than acting as that Predicate, so Constraints no longer needs a
type parameter. It is also a place to filter constraints for a
particular StorageKey in the future. The matchesKey implementation has
also been moved to a Predicate rather than relying on Constraints
directly.
CDK-177: Fix findbugs warnings.