chg: Don't reuse 'state' variable

We use this variable later on, so give a new variable for each of state,
status, and charge status.

Signed-off-by: Sean Cross <xobs@kosagi.com>
chg: Read cell capacity, rather than cell count

The cell capacity is a standard SBS command, and so doesn't require
looking through the flash of the gas gauge.  Switch to examining
the cell capacity to determine if a gas gauge needs to be reprogrammed.

Signed-off-by: Sean Cross <xobs@kosagi.com>