Solar Flux Variability and the Lifetimes of Cometary H2O and OH