Apple general counsel Donald Rosenberg leaving for Qualcomm