An upbeat Frenchman who spent more than a decade at the consulting firm McKinsey & Company, Mr. Joly, 58, explained that Best Buy’s turnaround was years in the making, and that it involved reshaping nearly every piece of the business. It’s a fascinating playbook for companies hoping to survive in the Amazon age.