The problem is that in `inverseKin` and `testKinCnst` we assume that non-mexed constraints => non-mexed dynamics. So if `inverseKin` is called with with `ikoptions.use_mex = false`, it not only omits the creation of C++ constraint objects, it also calls `doKinematics` with mex set to false. This leaves us with no way to compare the non-mex `AllBodiesClosestDistanceConstraint` against the mex one, as calling `collisionDetect` with a non-mex kinsol yields a different number of collision pairs than calling it with a mexed one.

Perhaps a better solution would be to split the `use_mex` flag in `inverseKin` into separate `use_mex_dynamics` and `use_mex_constraints` flags?