kevent: Prohibit negative change and event list lengths
Previously, a negative change list length would be treated the same as
an empty change list. A negative event list length would result in
bogus copyouts. Make kevent(2) return EINVAL for both cases so that
application bugs are more easily found, and to be more robust against
future changes to kevent internals.
Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e00bae5c181ac8282caf41cd33a076da03cf8ac9)