Refactored test suite template code

Restructed test suite helper and main code to support tests suite helper
functions, changed C++ comments to C-style, and made the generated
source code more navigable.
diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl
index ba61b68..30ee6b0 100755
--- a/tests/scripts/generate_code.pl
+++ b/tests/scripts/generate_code.pl
@@ -131,7 +131,7 @@
 
 
 /*----------------------------------------------------------------------------*/
-/* Common helper functions */
+/* Common helper code */
 
 $test_common_helpers