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>
.gitignore: tighten cgit ignore expression

This will allow wrappers added under tests/ to be added to version
control.

Signed-off-by: John Keeping <john@keeping.me.uk>
tests: add Valgrind support

Now running tests with the "--valgrind" option will run cgit under
Valgrind instead of all Git commands.

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