Cooperation Enforcement and Learning for Optimizing Packet Forwarding in Autonomous Wireless Networks