Tata Consultancy Services is investing in data centres as part of a plan to reposition the business for the artificial intelligence revolution.