Ronaldo rescues Portugal, Iceland, Ireland into last 16