Ask OpenSSL for certs location, fallback fixed list

Invoke the openssl command, handle failure, fallback to checking some
paths for certs; the default paths are taken from golang's TLS support.
"edit" functionality, some stability cleanups.

Ian Campbell contributed code to add an "edit" command, which downloads
a script, invokes a text editor, checks it and then uploads it.

I've mutilated his contribution; first, to not just use sensible-editor
but check for environment variables $VISUAL then $EDITOR, then try
sensible-editor, then vi (because it's the classic default, not because
it's good for newcomers -- if you don't like it, use env or implement
the sensible-editor system).

Then I made it dependent upon having VERSION capability because it uses
CHECKSCRIPT which is also dependent upon having VERSION.  Alas, my
server is old and does not support CHECKSCRIPT, so I can't be 100% sure
this works, but "correct by inspection".  *cough*

Added a SIGPIPE handler to abort a little more cleanly.  Tracked lost
connections better, to abort cleanly.

Uncovered that when getting a response from a server with a string
literal, I was not reading the CRLF which follows the string, so was
ending up unsynchronized.  Fixed.

Better return codes from functions.