add gitree.c v1

gitree can be used to:
1. Check git directory structure. (dir terminated with .git,
   including *.git and .git, and dir having objects and refs
   directories)
2. Find dir which has .git directory.
3. Find all files which are not in a bare Git tree.

Signed-off-by: ningjiang <ning.n.jiang@gmail.com>
update gitree.c to v2

V2: Redesign the core algorithm:
1. Check valid git tree through key git files.
2. For git tree, perform conformance check, give warnings when
   1) files break Git repo layout rule,
   2) git dirs name not terminated with .git,
   3) git dirs non-bare git tree,
   4) files not in a git tree.
3. For non git tree, print all the files under it and then
   continue the check with its sub directories.

Signed-off-by: ningjiang <ning.n.jiang@gmail.com>