First stab at the TEST_ORDERED and -r thing

This take care of ORDERED_TEST with -r completely, by fixing the test runs. You can try it.
The same principle could be used for post test run, and pre/post test group hooks.
Maybe a macro wrapper for setting the pre-test hook would be nice?
This fixes #55 and partly addresses #339.