A general integral representation result for continuum limits of discrete energies with superlinear growth