receive-pack.c: move transaction handling in a central place
receive-pack.c: move transaction handling in a central place

This moves all code related to transactions into the
execute_commands_non_atomic function. This includes
beginning and committing the transaction as well as
dealing with the errors which may occur during the
begin and commit phase of a transaction.

No functional changes intended.

Helped-by: Eric Sunshine <8d6e34f987851aa599257d3831a1af040886842f@sunshineco.com>
Signed-off-by: Stefan Beller <a7f3b1612c245dae606b3b9617b4f52187fddb65@google.com>
Signed-off-by: Junio C Hamano <a6723cc3f76163bf7adb636a73ac3b0ceb3e6b9b@pobox.com>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git