tinytest: implement per-test timeout (via alarm() under !win32 only) (cherry picked from commit 15b2f41d748643393b9f95b790d32e6bbbf38062)