Alastair Cook made 71 in his final Test match but India ended the day on top as Joe Root and Jonny Bairstow were out for ducks