Photoluminescence quenching of porous silicon in gas and liquid phases the role of dielectric quenching and capillary condensation effects