MFC r279154,r279397:
r279154 (by jilles):
nice(): Correct return value and [EPERM] error.
PR: 189821
Obtained from: NetBSD
Relnotes: yes
r279397 (by jilles):
nice(): Put back old return value, keeping [EPERM] error.
Commit r279154 changed the API and ABI significantly, and {NZERO} is still
wrong.
Also, preserve errno on success instead of setting it to 0.
PR: 189821
Relnotes: yes