Combined evaporation and salt precipitation in homogeneous and heterogeneous porous media