make it compile with clang

Basically that means avoiding cyclic class usages. This code makes
your head spin. Having said that, it only makes the current situation
quantitatively worse not qualitatively...
fix curly bracket screw-up if using Dune 2.2

oops. thanks to @bska for finding this.
Merge pull request #86 from andlaus/fix_cyclic_class_usage

make it compile with clang