Merkel steps down with legacy dominated by tackling crises