Gauge-invariant field strength correlations in QCD at zero and non-zero temperature