Commit savepoints in a well-defined order

This fixes nondeterministic failures in
doctest_lp485456_setattr_in_setstate_doesnt_cause_multiple_stores