The company has agreed to pay up to $500 million after it was accused of purposefully slowing down older phones during upgrades.