The mean square of the product of the Riemann zeta-function with Dirichlet polynomials