An evolutionary analysis of pop tunes revealed that over the past 30 years songs have grown sadder—but the big hits buck that trend. Christopher Intagliata reports.