Adding FreeBSD support

Largely copied the Linux epoll version and converted it to kqueue.

Tested on:
SmartOS Live Image v0.147+ build: 20140724T221203Z

In FreeBSD 10 amd64 (Image is: [8681d07a-6cc4-4984-8d1b-bb61a2a73d14](http://datasets.at/ui/#!/configure/8681d07a-6cc4-4984-8d1b-bb61a2a73d14))