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