Kill spawned process on websocket close.  Refactor to Endpoints.

Endpoint interface has process and websocket implementations.
goroutines are still started in main.go.  Extracted pipeEndpoints,
which, along with Endpoints, should make it easier to test.

I was full of shit about closing stdin being enough to kill the
process.  You have to kill it, then reap it.