Russia staves off hockey elimination, reaches quarters