Add lazy kqueue EVFILT_WRITE registration.

This fixes support for read-only file descriptors, such as those obtained
from libpcap by calling pcap_get_selectable_fd.
Fix shadow variable warnings.