ipcs: Backport socket creds handling from libqb

CMSG which can contain SCM_CREDENTIALS (where SO_PASSCRED is defined)
is now properly traversed and cmsg_type is checked.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
ipcs: Set SO_PASSCRED also on listening socket

This patch is needed for kernel patch
http://patchwork.ozlabs.org/patch/284366/

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>