Fix opening of log files with unprivileged_user

When running with unprivileged_user set, opening log files using the
/dev/stdout and /dev/stderr names fails because these special files
are not owned by the user the privileges were dropped to.

To resolve this, apply the same indirection we have in the CLI when
opening output files for reports: capture the /dev/stdout and
/dev/stderr special names and redirect them to the already-open
std::cout and std::cerr streams.

Fixes a bunch of test failures when running the Kyua test suite as
root with unprivileged_user is set.