Rework memory management and tests
There were many issues with memory management that showed in the autotests, which often were also not stringent sometimes only passing by accident relying on broken behavior in the API. There were fundamental problems in the client as well as in the server library. Large parts had to be rewritten.
Changes in an overview:
- Client memory handling was re-conceptualized completely. We release libwayland objects indiscriminately now to free the memory. There might still be memory leaks but it's a (radical new) start.
- Server memory handling was patched up at every place where a leak was registered in one of the autotests. That does not mean it's perfect. To be frank the server implementation seems unnecessary complicated and because of that very brittle. The API design and vision is incoherent. That needs a larger effort over a long time. I envision it to happen incrementally together with #5 (closed).
- xdg-foreign implementation was rewritten. There were memory leaks all the time and looking at the code there was not much to save. Too many signals connecting all over the place, not enough structure.
- Icon test for Plasma Window Management has been disabled. The implementation is broken (using pipes) and overall there seems no need to send icons. Not sure how the situation was back when it was introduced but nowadays all clients seem to have app IDs for looking up the icon. wlroots is doing it this way. See #8.
- SIGPIPE is ignored for now. The information from autotests is otherwise useless. That we rely on pipes in a library is a grave mistake to begin with but a proper solution needs some time, see #7.