Collective flavor oscillations of supernova neutrinos and r-process nucleosynthesis