Add PInvoke/Array tests (dotnet/coreclr#19266)
* Add PInvoke/Array tests
* Fix compile warnings
* Get tests passing on Windows again.
* Change error_t type to work xplat.
* Change error_t in types.h as well
* Clean up build slightly.
* PR feedback and native test code refactoring.
* Clean up header.
* Add a xplat implementation of _itoa_s for our tests.
* CHAR -> char
* Make calling convention cdecl to avoid stdcall mangling.
* Make return test native code cdecl as well (missed it before).
* Fix bug in platformdefines _itoa_s
* Return early in TP_itoX_s when num == 0
Commit migrated from https://github.com/dotnet/coreclr/commit/
f5a23fe0e3120e449ddce4b9c025305a786a2481