Initial FreeBSD support for epoll and vt's
This is an import of D18009, mostly by @tcberner and split into separate commits by me, with some tweaking.
Initial FreeBSD support for wayland.
Based on the diff here: https://reviews.freebsd.org/differential/diff/52600/ by Greg V greg@unrelenting.technology .