Introduce the unittest module

This new 'unittest' module is intended to support the creation of test
programs using an interface similar to that of JUnit-like frameworks.

At the moment, all this module allows is defining simple test cases
without support for fixtures and has no assert-style functions other
than the explicit "fail" call.  These extra features will all be added
separately.
Add support for skip tests to unittest
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.
Treat returning from setup/test/teardown as a pass

If setup/test/teardown evaluated a command as false as their very last
statement, the test case would be misteriously marked as failed.  This
is unexpected and surprising (especially because we do not "set -e")
and thus should not happen.

Change the code to discard the value of the last evaluated statement
so that, if the execution falls through the end of setup, test and
teardown methods, the test case is considered a success.

These routines can still "exit 1" (through "fail") to mark a failure.
Add test for imports with subdirectory components

We will be using this feature in subsequent commits so we must ensure it
works.
Add delayed failures to unittest

Extend the unittest library with a delayed_fail method that permits a
test case to record a failure while continuing execution.  This will be
useful to implement expect-style failures.
Add the register_check method

This internal function automatically generates an assert/expect pair of
functions for a corresponding check function (of which we have none yet).

We will be using this to easily generate boilerplate code around
low-level check functions and to ensure that all assert/expect pairs
behave the same.
Add expected failures

This feature currently does not support delayed failures due to the
complexity involved in implementing them and the little value in
doing so.
Add {assert,expect}_command to unittest

The new assert_command and expect_commad functions of unittest allow for
executing a command and validating any combination of its exit code, stdout
and stderr.

These new functions are added to an auxiliary module within the private
unittest subdirectory because their implementation is huge.
Add equal and not_equal check operators

This adds new assert_equal, expect_equal, assert_not_equal and
expect_not_equal tests to the unittest library.
Convert base_test to unittest
Convert bool_test to unittest
Convert cleanup_test to unittest
Convert cli_test to unittest
Convert config_test to unittest
Convert cvs_test to unittest
Convert list_test to unittest

While doing this, fix the filter function to output the filtered results
as a single line instead of multiple lines.  Allows for equality comparison
of the results.
Convert process_test to unittest
Convert shtk_test to unittest
Convert version_test to unittest