The Selberg integral and a new pair-correlation function for the zeros of the Riemann zeta-function