Competitive ultrafast electron and proton transfer reactions within titania and silica mesoporous materials