tvhpoll: various fixes for tvhpoll on 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