Resonant three-photon ionization and two-photon laser-induced fluorescence of atomic oxygen in a discharge and post-discharge