Edits to allow using osim models with KneeConstraint
(Added a flag (_useKneeConstraint) to apply changes needed for acces state variabels
via their indices, while reading optimized torques etc.)