LOG calls need level as arg1
Correct res_dir(5) example

The keyword is 'dir', not 'directory'
Better stderr/stdout logging in exec/run

The cw_run2 helper function has been modified to accept a structure
containing the stdin/stdout/stderr file handles and a UID/GID to run the
command as (in the forked sub-process).

Callers of that function have been updated accordingly.

s_exec is no more, and the uf_exec_* callbacks have been switched over
to cw_run2.  Additionally, they now log all stdout and stderr from run
commands, to DEBUG and WARNING log levels, respectively.

This should make it easier to crank up the debugging on failing cogd
runs and see what is going on with stuff like cwtool/dpkg.