On Lifetime Maximization and Fault Tolerance Measurement in Wireless Ad Hoc and Sensor Networks