On the cooling of the plasma fireball produced by a laser spark in front of liquids and solids