Mod $p^3$ analogues of theorems of Gauss and Jacobi on binomial coefficients