Add configuration for checking of Received Objects

Adds ability to configure the checking of Received Objects that is
performed by jgit on a per project basis based on the project.config

See jgit setCheckReceivedObjects() function

Currently this is set to true in all cases so that all objects are
checked for validity. Unfortunetly some pre-existing repositories
have known issues within their git history with Invalid Trees written
by other(non jgit) implementations. These issues can be seen in
repositories when git fsck --full is run.

While doing this check is correct in most cases it causes issues when
repositories are being sync'd from upstream servers or transfered from
other git servers to gerrit.

This changes adds a git-checks section to the project.config that allows
the checkReceivedObjects key to be used to control this check.

The default is always true unless overridden in the project.config file.

Test Procedure:
In order to test this you need to create a projects with the ability
to directy upload changes/branches including merge commits. You will also
need the ability to forge author/commiter identity. This project should
have no initial commit.

Locate a repository with the following formatted issue:
warning in tree <SHA SUM>: contains zero-padded file modes

Firstly attempt to push the effected tree to the created project, this
should fail.

Clone the test project and checkout refs/meta/config modify the
project.config file to include:

[receive]
	checkReceivedObjects = true

Upload this new config and attempt to push the effected tree again, this
should still fail.

Modify the config to be:

[receive]
	checkReceivedObjects = false

Upload this config and then push the effected tree again, this should succeed.

More info regarding this issues is located here:

https://groups.google.com/forum/#!topic/repo-discuss/O_TaspFfY7s
https://groups.google.com/forum/#!topic/repo-discuss/b_jX_7pal3U

---------------------

Change-Id: I9f566557dfdc0a33c7c88d76fc7c247dd838dea4
3 files changed