HPCC-10142 queryLogicalFilename not supported on hthor

Refactor the code
    - Separate the superfile processing and use nested iterators
    - Separate single file processing
    - Remove leading '~' char from logical file name.

Tested with issue10142.ecl

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>

why the type cast?
I notice checkOpenedFile parameters are unconventionally declared as 'char const *' vs 'const char *' - although both are equivalent, it would be best to change.