Move all code generation to a single file

This centralizes all three "code generation" bits to the same file making oversight or mismatches in the generated code easier to spot.

Also, this fixes some "export" issues with dyntest-unit.

Signed-off-by: Andrew Page <admwiggin@gmail.com>