Protect tasks weak set manipulation in ``asyncio.all_tasks()``