init.sh: avoid unnecessary shell re-exec
* tests/init.sh: Improve the re-exec-required check to first test the
current shell. If it passes the test, do not search for a shell that
does pass, and do not re-exec. This test is particularly contorted to
avoid triggering misbehavior in Solaris 10's /bin/sh whereby any use
of $(...) evokes a syntax error and causes immediate shell exit with
status 2. Bruno Haible reported that the re-exec made it impossible
to single-step through any init.sh-using script.