smb: speed up connection between libdsm and libsmb2
The goal of this MR is to speed up SMB connection if the wrong protocol version is probed first (between libdsm and libsmb2).
The final goal is to speed up network paring via the medialibrary (up to 30ms per access).
Based on !1388 (merged), only the last 4 commits should be reviewed.
Edited by Thomas Guillem