Cluster-tilted algebras are Gorenstein and stably Calabi–Yau