Convert body_idx to int32 in MinDistanceConstraint

This was being done in collisionDetect but not here. It's necessary because
constructPtrRigidBodyConstraintMex expects an int array.