c/binaries: Check for libstdc++ dependencies

If binaries uses libstdc++, check that the package actually seem to
depend on it.  Futhermore, allow libstdc++ as replacement for libc for
shared libraries.  The latter reduces a number of false-positives when
the linker decides to skip the libc linking with --as-needed
(#719806).

Signed-off-by: Niels Thykier <niels@thykier.net>
t: Fix a couple of issues with the C-code used in tests

Add missing include for string.h and have int function return an
integer.

Signed-off-by: Niels Thykier <niels@thykier.net>