peek_packet.c: perform more validation and extract host= param
Perform a bit more validation on the format of the initial incoming
git daemon request packet and reject poorly formatted packets or
packets with unwanted control characters.
Additionally, if the "host=" parameter is found (included since
ancient Git versions), extract and parse it and dump out one or two
extra shell-friendly lines to provide a lowercased version of the
host name and a range-checked port number.
Consumers of the `peek_packet` output will need to adapt to handle
the case in which more than one line is output. This will normally
always happen now unless a very ancient version of Git was used as
the client.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>