Changes to reinitialize global data.

Adding tests that directly call the cxxtest.cxxtestgen.main()
function.