This MR is based on Peter's (@whot) branch to add support for libei in Xwayland.
I rebased @whot's branch on to of the current xserver master branch and added a few fixes for the issues I found while testing.
This builds and, from the quick test I've ran here in the past few days trying to debug various issues, seem to work resaonably well, keyboard and pointer events (even absolute events) seem to work. But of course, this is still all a work in progress.
Eventually, we'll probably have to squash all these commits and fix the indentation to match the rest of the xserver/xwayland code.