HPCC-9904 - ensure detach checks if allowed to delete file

Regression introduced by HPCC-8364, allowed logical files to be
deleted by various components (e.g. thor writing to a file) even
if logical file was owned by a superfile.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>