Validate uniqueness constraints for new data.

This is the very first attempt that doesn't take any locks and only
considers one of many potential violation scenarios.