Allow cyclic dependencies in generated C++ headers by changing order of includes and creating forward declarations.