Top-down order for functions in charmonizer.main

It's a matter of taste but it makes the code more readable in my
opinion.
Start with OO approach to Makefile creation
Split out code to generate CFC rules for C build
Split out code to generate test rules for C build
Adjust Makefile for Perl build
Regenerate charmonizer.c