A Mathematical Model for the Lead-Acid Cell: Discharge, Rest, and Charge