fix(remotehelper): skip receive-pack POST when send-pack emits no request
Commit

On git push --dry-run (and batches where every update is rejected
client-side), stateless-rpc send-pack guards the entire request
emission with !args->dry_run / cmds_sent: its stdout is just the outer
flush followed directly by helper-status lines — no request body and
no trailing flush. handlePush unconditionally POSTed the empty body,
which the server deliberately rejects with HTTP 400, and then tried to
drain a trailing flush that doesn't exist.
Mirror remote-curl.c:rpc_service, which breaks without calling post_rpc when the first packet is a flush: when the wrapped request is empty, skip the POST and the trailing-flush drain and relay the helper-status lines directly.
The two existing send-pack shell stubs emitted an empty request plus a trailing flush — a wire shape real send-pack never produces; they now emit a wrapped one-command request. New invariant tests cover the dry-run and all-rejected shapes via stubs, plus one driving handlePush against the real git binary to pin the wire-shape assumption.
Fixes ENT-1199.
Assisted-by: Claude Opus 4.8 noreply@anthropic.com Signed-off-by: Paulo Gomes paulo@entire.io Entire-Checkpoint: 01KXQSVXM5F51FD2GV0BT6VRYK