Execute functions registered with atexit.