Safety Guarantees for Planning Based on Iterative Gaussian Processes