Artificial Intelligence for Wireless Connectivity and Security of Cellular-Connected UAVs