Cleanups to *ERR* compat shims.
- Use [u]intptr_t casts to convert pointers to integers.
- Change IS_ERR* to return bool instead of long.
Reviewed by: manu
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27577