Brilliant Brook and Root centuries put England on top in second Test