[tor-commits] [tor/master] Move close-and-cleanup functions to a postloop event.