Maximum-energy records in glassy landscapes