All of the supported Git commands required the project to be writable. We have seen HTTP 500s at Google because not all code paths would check if the project state permits writes. This commit moves the check in ReceiveCommits to a more central to mitigate the problem. Change-Id: Icdea3349583f676580991cd688ae7e9d95564a21