Balancing Energy Consumption and Average End-to-End Delay for Optimum Routing Protocol in Wireless Sensor Networks