Mastercard Inc. agreed to buy cyber-defense firm Recorded Future for $2.65 billion to boost its ability to protect the card company’s massive global-payments system. The purchase from private equity firm Insight Partners will expand Mastercard’s ability to use artificial intelligence …