Gauge invariant field strength correlators in pure Yang-Mills and full QCD at finite temperature