De-k&r-ify function definitions in kern/kern_resource.c

No functional changes.
Tidy up functions related to uidinfo management.

- reference found uidinfo in uilookup
- reduce nesting by handling shorter cases first