Measurement of time-dependent CP asymmetries in B0→D(*) ±π and B0→D±ρ decays