Spatial mapping of ices in the Ophiuchus-F core. A direct measurement of CO depletion and the formation of CO_2