Defending champion England staged a remarkable late comeback to beat Sweden in penalties and advance to the semifinals.