Formation of cometary O_2 ice and related ice species on grain surfaces in the midplane of the pre-solar nebula