IBM plans to buy RedPill Solutions, a consulting and data-mining services company based in Singapore, for an undisclosed sum.