Residual connections provably mitigate oversmoothing in graph neural networks