Detection of Lithium-ion Battery Failure and Thermal Runaway