Made some minor changes to fit conventions

- Changed libgit2.so to libgit2.$(SHLIB_EXT) to maintain convention and
make more generic
- Added a USE_SYSTEM_LIBGIT2 to check before adding libgit2 to stage 1
deps list
- A few cosmetic changes

Ref #4158