On deformations of D-manifolds and CR D-manifolds