Moved code to self-contained MuscleModel class, which additionally includes a variable-timestep solver for the model.