Use PID for socket to allow multi-user (and make development a bit cleaner)
On Unix-based systems, delete the socket file on close (Windows appears to remove the pipe on close). Because teardown is async, the before-quit event is tweaked to prevent closing until the operation completes.
This PR has two separate fixes:
before-quit
event is tweaked to prevent closing until the operation completes.Resolves #622