Greece ended its worst recession in more than a half-century, emerging from a period marked by two bailouts and financial-market turmoil that almost pushed the country out of the euro