Issue #20510: Rewrote test_exit in test_sys to match existing comments
and to modernize.  Initial patch by Gareth Rees.