Line formation in solar granulation: IV. O I, OI and OH lines and the photospheric O abundance | Synapse