Flops, Type III contractions and Gromov-Witten invariants on Calabi-Yau threefolds