sub-process: separate process lifecycle from hashmap management
subprocess_start() and subprocess_stop() couple two concerns: managing a child process (setup, handshake, teardown) and managing a hashmap that indexes running processes by command string. The hashmap suits callers like convert.c where many files may share one filter process looked up by name, but callers that manage process membership under their own rules do not need the coupled operations. Extract subprocess_start_command() and subprocess_stop_command() so callers can reuse the child process setup and handshake machinery without the map operations. subprocess_start() and subprocess_stop() become thin wrappers that add hashmap operations on top. The diff process support added later in this series keeps its processes in a pool owned by a per-repository provider object, and an entry for a failed command must stay behind there so the command is not retried. That membership follows rules subprocess_start() and subprocess_stop() do not know. The pool therefore uses the _command variants for process lifecycle and manages its own map. Signed-off-by: Michael Montalbo <mmontalbo@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>