Preparing to replace `smbclient_mutex`, for finer-grained locking.
As a side effect, the input plugin closes the SMB/CIFS connection after closing the file. This solves one part of https://github.com/MusicPlayerDaemon/MPD/issues/916