AT&T profit beats estimates as iPhone sales drop helps margins