Configuration spaces in homotopy theory I