Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimization