[nfs] Fix library syncing (trac #14727) for edge-cases resulting from less-common NFS export configurations partially resulting from recent CStdString conversion.

Squashed commit of the following:

commit 1cd13db9822a5a609c232a614e67c361ca260f2d
Author: Nigel Jones <nigel@nigelj.com>
Date:   Sun Dec 8 02:47:08 2013 +1300

    [nfs] Recommendation from PR 3772 by jmarshallnz for code cleanup implemented avoiding the substr routine.

    exportPath is only set if a valid export is found.

commit be9d0b0aa42b4710a5005824c1d04f1a69120cbc
Merge: a43d406 d32ff6e
Author: Nigel Jones <nigel@nigelj.com>
Date:   Sat Dec 7 03:09:32 2013 -0800

    Merge pull request #1 from Memphiz/nfsfix-14727

    [nfs] - handle special case when "/" is exported via nfs - we need to al...

commit d32ff6e89bde24909fbf7e97acf0bfa5a8ae5ac7
Author: Memphiz <memphis@machzwo.de>
Date:   Fri Dec 6 23:35:48 2013 +0100

    [nfs] - handle special case when "/" is exported via nfs - we need to allow empty pathes here when accessing nfs://ip/ (path is empty here - export is "/").

commit a43d40673887965041939181dab8dcd077049c92
Author: Nigel Jones <nigel@nigelj.com>
Date:   Sat Dec 7 00:27:49 2013 +1300

    [nfs] - Ensure that the right export is picked if multiple overlapping names may match with StartsWith.

commit 61fb6f567f0a229c1869bbb76524706914574ba9
Author: Nigel Jones <nigel@nigelj.com>
Date:   Fri Dec 6 23:44:03 2013 +1300

    [nfs] replacement fix for dd4dd2e91bc083a23fe7b46ae4c291c6672d32e0 (issue #14727).

    If the exportPath is the same as the path is then bypass the substr methods, and return the correct relativePath.