configure: use pkgconfig to detect samba

I'm just the messenger for this, all credits go to @ncopa from irc.

Recent Samba versions require pkg-config. We try that first but fall
back to old behaviour if smbclient.pc is missing.

This solves also an 'issue' with samba4 that correctly detects the
libsmbclient in the link test in configure, but fails to compile later
due to missing headers.