 TransUnion is nearing a deal to buy information-services company Neustar Inc. for 3.1 billion, according to people familiar with the matter, a move that could help the consumer-credit reporting giant diversify beyond its core business and put data to new uses. 