Germany has laid out an ambitious timetable to get nearly all of its power from renewable sources like wind and solar within 40 years, but there are major challenges ahead.