websocket: some cleanup to make more friendly behavior as API

WebSocketServer is considered library API for generic usages, as such it should not assume it has total ownership on process resources, such as signals and std*.

This patch series tries to address the trivial issues.

Thanks you!