Microscopic density functional theory of wetting and drying of a solid substrate by an explicit solvent model of ionic solutions