Europe’s economy stagnated late last year as its former growth engine, Germany, finished a second straight year of shrinking output.