Fix kevent for netbsd filter datatype
Fix kevent for netbsd filter datatype

The datatype for kevent.filter is u32 on NetBSD and
i16 on all other supported platforms. This was recently
fixed in upstream libc, breaking this API, so this
fixes it.

This change also modernizes the code a bit to unify the
EventFilter datatype across platforms and switch to the
libc_enum! macro.

geofft/nix-rust,xd009642/nix,MarkusJais/nix-rust,geofft/nix-rust,nix-rust/nix,carllerche/nix-rust,Susurrus/nix,carllerche/nix-rust,asomers/nix,xd009642/nix,Susurrus/nix,MarkusJais/nix-rust,asomers/nix,Susurrus/nix,geofft/nix-rust,MarkusJais/nix-rust,xd009642/nix,carllerche/nix-rust,nix-rust/nix