The Kähler–Ricci flow through singularities