[SPARK-3788] [yarn] Fix compareFs to do the right thing for HA, federati...

...on.

HA and federation use namespaces instead of host names, so you can't
resolve them since that will fail. So be smarter to avoid doing
unnecessary work.