PolkitSystemBusName: Add public API to retrieve Unix user

And change the duplicated code in the backend session monitors to use
it.  This just a code cleanup resulting from review after
CVE-2013-4288.  There's no security impact from this patch, it just
removes duplicated code.

https://bugs.freedesktop.org/show_bug.cgi?id=69538
examples/cancel: Fix to securely lookup subject

This is just an uninstalled example, but it needed the same fix as was
done for pkexec with the 3b12cfac29dddd27f1f166a7574d8374cc1dccf2
commit.

This drops use of deprecated API.

https://bugs.freedesktop.org/show_bug.cgi?id=69538
Fixed compilation problem in the backend
Don't discard error data returned by polkit_system_bus_name_get_user_sync

https://bugs.freedesktop.org/show_bug.cgi?id=71458
sessionmonitor-systemd: Deduplicate code paths

We had the code to go from pid -> session duplicated.  If we have a
PolkitSystemBusName, convert it to a PolkitUnixProcess.
Then we can do PolkitUnixProcess -> pid -> session in one place.

This is just a code cleanup.

https://bugs.freedesktop.org/show_bug.cgi?id=69538
PolkitSystemBusName: Retrieve both pid and uid

For polkit_system_bus_name_get_process_sync(), as pointed out by
Miloslav Trmac, we can securely retrieve the owner uid as well from
the system bus, rather than (racily) looking it up internally.

This avoids use of a deprecated API.

However, this is not a security fix because nothing in the polkit
codebase itself actually retrieves the uid from the result of this API
call.  But, it might be useful in the future.
Port internals non-deprecated PolkitProcess API where possible

We can't port everything, but in PolkitPermission and these test
cases, we can use _for_owner() with the right information.
Use G_GNUC_BEGIN_IGNORE_DEPRECATIONS to avoid warning spam

In these cases, we can't every drop use of our API which we deprecated
for external callers; for example where a (deprecated) command line is
invoking the deprecated API.

This patch avoids having polkit developers get spammed by unfixable
warnings.
pkexec: Work around systemd injecting broken XDG_RUNTIME_DIR

This workaround isn't too much code, and it's often better to fix bugs
in two places anyways.

For more information:

See https://bugzilla.redhat.com/show_bug.cgi?id=753882
See http://lists.freedesktop.org/archives/systemd-devel/2013-November/014370.html