Mark constraint index as owned when constraint is committed.

Also add a reference to the constraint index from the constraint.