HPCC-11136 - Fix problems writing to external files

Problems:
1) DFS lookup was unconditionally creating a IDistributedFile for
externals
2) Thor by accident rather than by design relied on previous
lookup of the external, to create the distributed file as a
side-effect. And then due to the false-positive lookup, required
OVERWRITE despite the file being missing.
3) HThor always wrote to the wrong place (treated it a standard
scope name) and ignored overwrite.
4) Roxie failed in DFS detach() - fix detach() so it can handle
externals.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #5745 from jakesmith/hpcc-11136

HPCC-11136 - Fix problems writing to external files

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>