Germany’s ruling coalition agreed in principle to reform the country’s renewable energy subsidies after months of wrangling over which areas to cut.