Ensure UniquenessConstraint created by BatchInserter are consistent.

A UniquenessConstraint consists of two records in the Schema store, one
representing the constraint, and one representing the backing index. The
backing index should reference the constraint as its owning constraint,
and the constraint should reference that it owns the index. The
BatchInserter failed to set up this relationship properly since it
generated the id for the constraint record twice.
This commit fixes that issue.
Merge pull request #2603 from thobe/2.0-consistent-batch-constraints

[2.0] Ensure UniquenessConstraint created by BatchInserter are consistent.