Hyprland hasn't been using TCP sockets for IPC since the first release,
so this getaddrinfo call and its result was never needed.
Additionally, it leaks the `aiRes`, causing test failure under ASan.
Allows us to disable modules entirely when socket connection isn't
working. This is similar to how sway handles their socket connections
disabling modules. This supports a single waybar config for multiple
IPCs.
IPC messages are parsed in a dedicated thread, and the thread terminates when
an exception is not caught, which causes the waybar process to crash with
SIGABORT.
While this issue might be related to Hyprland, it is really annoying to see
waybar crash. It would be better to catch those exceptions and report errors
instead of crashing.
1. Fix warnings reported by clang tidy
2. Use unique lock instead of manully lock/unlock on mutex.
The RAII style locking makes sure mutex is unlocked when exceptions are thrown