Revert "Fix testall always succeeding, even when there are failed tests."

This reverts commit 0013fd83bb8c494dd0ca42c75c0384e4d2f6bc5a.

Apparently relying on the $? variable inside a trap handler doesn't
work in all shells (Solaris).

New fix will follow.
Fix testall returning success even when there are failures.

The trap handler hides the exit code, so don't use it unless we have
to.