fixed a bug of writing IK constraint, added write* static methods
added written argument to IModel#save