Coinbase Global Inc. posted a profit and revenue doubled as this year’s cryptocurrency recovery carried into the second quarter.