Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by:	kib
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f