A 1D microphysical cloud model for Earth, and Earth-like exoplanets: Liquid water and water ice clouds in the convective troposphere