Apple agrees $500m settlement for slowing down older iPhones