!!! WIP !!! Submodules: Add test library

Add a test library which makes it easier to cover all combinations of
submodule update scenarios. Call the appropriate test functions for all
work tree manipulating commands.

Document the bug that when a submodule is replaced with a tracked file of
the same name the submodule work tree including any local modifications
(and even the whole history if it uses a .git directory instead of a
gitfile) is simply removed with a "test_expect_failure".

Add the test_dir_is_empty() helper to test-lib-functions.sh to make it
easier to test that a submodule directory exists but is empty.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>