1) val is sufficient as "int" (read the standard)
2) BUGFIX: If getpriority fails, it returns -1 and sets errno.
Previously, it would correctly catch the errno but not take
care of the fact that by then val has been decremented by 1.
Only change val if the getpriority-call has been successful.
3) Add LIMIT()-macro from st to increase readability.
4) setpriority returns < 0 on failure
5) Remove bikeshedding-comment. Read the standard if you wonder.
6) return-value trick from env(1)
- add .Os, it is mandatory.
- don't redeclare .Nm when it's not needed.
- fix some warnings (checked with mandoc -Tlint).
- remove some leftover old stuff.