util: [rmtree] try best to catch errors for race condition
fixes: #2481
This approach is ugly, but just working.
ENOENT and ESTALE errors are catched in `chdir`, `listdir` calls to stomach the deletion by other process/thread
ENOTEMPTY is catched when calling `os.rmdir(path)` in `rmtree()` too. It happens when `path` is on an NFS like where ESTALE happens.