MAGIC long-term study of the distant TeV blazar PKS 1424+240 in a multiwavelength context