Charging and maintenance of lithium battery pack