Essentially Tight Kernels for (Weakly) Closed Graphs