Mainstream parties wane but set to cling to power in polls in Brandenburg and Saxony