MFC: r274960 (slightly modified)

Limit descriptors and enter capability mode.  Since the header was renamed in HEAD, this
commit includes sys/capability.h.

Differential:	D1009
Reviewed by:	jonathan, pjd
Relnotes:	yes