Fix for NPE when listing a DFS share

The NullPointerException occurs irregularly during the day but quite
often about every 5-10 minutes. We figured out, that the root cause was
an I/O Exception due to timeout on the socket transport level, probably
because the remote server has not responded or the network connection
failed. 
As Mike mentioned in his post, there is a problem in jcifs
implementation that tconHostName is explicitly set to null, when a
transport exception is thrown. On a reconnect attempt in Dfs.resolve()
the NPE is thrown, because tconHostName is null.

https://lists.samba.org/archive/jcifs/2012-March/009874.html
Fix for possible deadlocking between Dfs and SmbTransport

Basically, the Dfs.resolve() and Dfs.insert() methods do not need to be
synchronized, only the "referrals" member needs to be locked (using an
additional lock, because the member itself can be replaced). This way,
calls such as getDc() in Dfs.resolve() won't deadlock.

https://lists.samba.org/archive/jcifs/2012-March/009873.html
Prepared patches for DFS issues (NPE and deadlocking)