The contribution of icy grains to the activity of comets: I. Grain lifetime and distribution