tests: use Git test functions directly

This removes the run_test and tests_done wrapper functions, changing
everywhere they were used to use the correct Git test functions instead.

Signed-off-by: John Keeping <john@keeping.me.uk>
tests: don't let Git's test-lib create a repository

We create our own repository structure for all CGit tests, so letting
Git's test-lib.sh create one as well just causes an unnecessary call to
git-init.

Signed-off-by: John Keeping <john@keeping.me.uk>
tests: remove prepare_tests

Instead, setup the test repositories automatically.  Provide a variable
that can be used by tests to override this behaviour if they want.

Signed-off-by: John Keeping <john@keeping.me.uk>
t0001: don't setup test repositories

This test doesn't use the test repositories, so it doesn't need them
created.

Signed-off-by: John Keeping <john@keeping.me.uk>
tests/.gitignore: update for using Git's test infrastructure

Signed-off-by: John Keeping <john@keeping.me.uk>
tests: remove "trash" directory

Now that we're using Git's test framework, it generates a suitable trash
directory for us to use, so we don't need to create a "trash"
subdirectory.

This patch was generated with "sed -i -e 's!trash/!!g' tests/*.sh" with
the t0107-snapshot.sh tests fixed to avoid passing "-C trash" to tar or
"-d trash" to unzip.

Signed-off-by: John Keeping <john@keeping.me.uk>
tests: put cgit onto $PATH

This will allow us to override the path with wrappers to provide
additional functionality, such as for Valgrind.

Signed-off-by: John Keeping <john@keeping.me.uk>