Constraints on dark matter annihilation and its equation of state after Planck data