Cain pitches first perfecto for Giants