mythbackend: fixes QUERY_FILE_HASH hanging

The frontend will typically call the backend with an identifier, and not its IP address. As such, the backend attempt to transfer the QUERY_FILE_HASH command to anoyher backend (which is itself) resulting in an infinite loop

Fixes #12212

(cherry picked from commit 7fa5c4fe97cf27dae4bee3f0d1b96ca1940f6f68)
metadata: fix wrong test leading to incorrect hash calculation

This would have almost always returned true, meaning it would attempt to calculate the hash of a file unlikely to exist locally.
Simplify code + style

(cherry picked from commit 1c89d567b594af44eb18b28ebe1df5ae18f8b032)
BE: Fix 'MythSocket: Programmer error, QEventLoop isn't running...' during BE exit

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit f8614bb8eea8428a558f257a8c4a7f04af807c94)
protoserver: fixes QUERY_FILE_HASH hanging

same as 933b61ffbe9af3cc6a69df001463fd2141c36b60