Complete cohomology and Gorensteinness of schemes