McDonald’s acknowledged on Wednesday that it lost 500 million customer transactions in the U.S. since 2012 and laid out its plans to get more people back into its restaurants — including by letting them order and pay on their mobile phones by the end of the year.