Sri Lanka ride on Thirimanne-Mathews stand to put up 238, but India overhaul it with 21 balls in hand