Backport more server crash fixes to 21.1 branch
All 3 fixes are from @mherrb, from !995 (merged) & !1176 (merged):
- Don't crash if the client argv or argv[0] is NULL.
- Return NULL in *cmdname if the client argv or argv[0] is NULL
- Fix a double-free on syntax error without a new line.