Ben Stokes and Ollie Pope both made stunning centuries, as England dominated South Africa on Friday to take control on day two of the third Test between the sides.