Uniform Error Bounds for Gaussian Process Regression with Application to Safe Control