Bairstow hit 124 off 112 balls as England beat India by six wickets to go level in the three-game series.