Linear time-varying H2-optimal control of sampled-data systems