Joint Optimization of UAV Trajectory and Task Scheduling in SAGIN: Delay Driven