Replace most uses of ast_register_atexit with ast_register_cleanup.