Upgrading your phone every few years has a huge environmental impact. Here’s how to make your device last longer.