Cosmological constraints on decaying dark matter