Fix bug related to ACN parameterized types

I separated the generation of encoding prototypes (in the .h file) to the end of the file to make sure all types have been declared before. Parameterized ACN types have extra param that can use other types.