$Q$-Learning Aided Intelligent Routing With Maximum Utility in Cognitive UAV Swarm for Emergency Communications