Modern smartphones can safely stay plugged in overnight, but temperature and charging habits still affect long-term battery health. Here's what Apple, Samsung and Google say.