receive-pack.c: add protocol support to negotiate atomic-push

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
send-pack.c: add an --atomic-push command line argument

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
receive-pack.c: use a single transaction when atomic-push is negotiated

Update receive-pack to use an atomic transaction IFF the client negotiated
that it wanted atomic-push.
This leaves the default behaviour to be the old non-atomic one ref at a
time update. This is to cause as little disruption as possible to existing
clients. It is unknown if there are client scripts that depend on the old
non-atomic behaviour so we make it opt-in for now.

Later patch in this series also adds a configuration variable where you can
override the atomic push behaviour on the receiving repo and force it
to use atomic updates always.

If it turns out over time that there are no client scripts that depend on the
old behaviour we can change git to default to use atomic pushes and instead
offer an opt-out argument for people that do not want atomic pushes.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
push.c: add an --atomic-push argument

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
t5543-atomic-push.sh: add basic tests for atomic pushes

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
receive-pack.c: add a receive.preferatomicpush configuration variable

Add receive.preferatomicpush setting to receive-pack.c to request that
clients will always use atomic pushes, when supported.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>