Learning an Adaptive Forwarding Strategy for Mobile Wireless Networks: Resource Usage vs. Latency