Deal with ModelTypes where json->native->json doesn't roundtrip correctly

The `Timedelta` modeltype of edx-platform has this issue where the json -> native -> json roundtrip doesn't give back the same json value. This seems to be due to how Timedeltas internally store things - they only have a days and seconds attributes, whereas we also recognize hours and minutes.

@nedbat @ormsbee