An Energy-Flow Model for Self-Powered Routers in Rural Mesh Networks and its Application for Energy-Aware Routing