A homotopy-theoretic view of Bott-Taubes integrals and knot spaces