tvhpoll: Various kqueue fixes for FreeBSD

- kqueue filters are not bitmasks so we need to treat them a bit different
- Properly check timeout because default value is -1
- Use correct variable kevent.filter to detect which event was triggered
- Fix building on FreeBSD i386

I'm not sure if I got this git stuff right this time but I hope for the best.