The change in this PR is based on the discussion at this PR 2598 Thanks to all the discussions and this should be inline with the discussions.
The tests are taken from Peter's commit f6f9387 with slight modifications to cover both cases: preserveWorldVelocity and zeroWorldVelocity
The tests in joint_set_position_test all pass but the other unit and integration tests are still running to see whether any functionality is affected
This is looking good to me. But it looks like right now the _preserveWorldVelocity is being completely ignored in the derived classes. We don't have to implement the flag in all physics engines, but we should be sure to notify the user if _preserveWorldVelocity is set to a value that is not the current behavior of the physics engine instead of ignoring it and performing the current behavior anyway. Also don't forget to add the flag to simbody/SimbodyJoint and dart/DARTJoint as well.