MFC r268074:

Perform a lockless check in sigacts_shared.

It is used only during execve (i.e. singlethreaded), so there is no fear
of returning 'not shared' which soon becomes 'shared'.

While here reorganize the code a little to avoid proc lock/unlock in
shared case.
MFC r268087:

Don't call crcopysafe or uifind unnecessarily in execve.
MFC r268136:

Plug gcc warning after r268074 about unitialized newsigacts
MFC r268365:

Don't call crdup nor uifind under vnode lock.

A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.
MFC r268505, r268507:

Avoid relocking filedesc lock when closing fds during fdp destruction.

Don't call bzero nor fdunused from fdfree for such cases. It would do
unnecessary work and complain that the lock is not taken.

=======

Don't zero fd_nfiles during fdp destruction.

Code trying to take a look has to check fd_refcnt and it is 0 by that time.

This is a follow up to r268505, without this the code would leak memory for
tables bigger than the default.
MFC r259407:

proc exit: don't take PROC_LOCK while freeing rlimits

Code wishing to check rlimits of some process should check whether it
is exiting first, which current consumers do.
MFC r268514:

Eliminate plim and vtmp local vars in exit1.

No functional changes.
MFC r264114, r264310, r268570:

r264114 by davidxu:

Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

r264310 by davidxu:

Add kqueue support for devctl.

r268570:

Clear nonblock and async on devctl close instaed of open.

This is a purely cosmetic change.
MFC r268634:

Manage struct sigacts refcnt with atomics instead of a mutex.