Porous silicon microcavities as optical and electrical chemical sensors