Hitchhiking, collapse, and contingency in phage infections of migrating bacterial populations