Improve MD2D model serialization - serialize obstacles

[#43089109]
Convert Infinity to "Infinity" string during serialization

JSON doesn't accept Infinity.
Serialize restraints