Pull up following revision(s) (requested by maxv in ticket #1086):
        sys/compat/freebsd/freebsd_sched.c	1.20-1.21

Avoid NULL dereference and fix sched param conversion (at least make it
do something). Pointed out by Maxime Villard.

Simplify and clarify.
Ticket 1086.
Pull up following revision(s) (requested by maxv in ticket #1090):
	sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.24
	sys/compat/netbsd32/netbsd32_event.c: revision 1.11
Allocate directly KQ_NEVENTS bytes. Otherwise a user can panic the system.
ok christos@
Ticket 1090.