Safer, faster-charging batteries