The shutdown hook can't be a buffer-local thing, it has
to be a server property. Also, on shutdown in eglot.el,
remember to first unmanage buffers and only then affect
eglot--processes-by-project.
* eglot.el (eglot--on-shutdown): reverse order of first
two sexps.
(eglot--connect): Pass a shutdown function to jrpc-connect
(eglot--managed-mode): Don't use jrpc-server-moribund-hook
(eglot--buffer-managed-p): Simplify. Use eglot--find-current-process.