fix tests: include type traits early

the std::string type traits (such as serialiser) are
cached from the first time its used to define e.g. a field

subsequent uses of such type dont have the specialised serialiser
as its used from the first time it was generated (assigned to
GMetaType virtualFunctions).

An alternative fix would be to clear mapped classes cache after each
test.

Note: the tests compiled with -O3 weren't affected, this was reproducible
only with -O0 compile flag.