India beat England by six runs to win fifth Test on its final day at the Oval and level the five-match series at 2-2.