server: refactor sse
server: refactor client management to lib/sse