Apple and Qualcomm end their long legal war