The Algebra and Calculus of Stochastically Perturbed Spacetime with Classical and Quantum Applications