Sync test-skeleton.c with glibc

This patch syncs test-skeleton.c with latest glibc (commit a502c5294b4)
code. The glibc itself does not use test-skeleton.c anymore, but rather
the internal libsupport library. To avoid import a whole infrastructure
(libsupport) to use just a limited subset for the string tests, the
changes are based on support/support_test_main.c file.

The main differences to glibc implementation are:

  - No support for environment variables TEST_DIRECT or TEST_COREDUMPS
  - Temporary files inline in implementation instead of a external
    module.
  - Tests configuration done by macro and defines.

Change-Id: I93a532f8388b91572d2a0fd851d24387c5d3a10e
1 file changed