Add support for test fixtures

Fixtures are sets of related test cases that share some common setup and
teardown code.

Because the shell does not have scoping for nested functions, and because
we lack the equivalent of classes, we play some tricks to emulate the
common syntax found in JUnit-like libraries.