A few changes to when and how you charge, plus one built-in setting, can keep your phone’s battery healthier for longer.