MDLSITE-3433 add unit tests to local_hub

Starting with test for is_remote_site_valid() and the testcase which
fails.
MDLSITE-3433 Improve site connectivity check

Use our library functions to manage curl and for free
get a fix to the no-useragent problem.
MDLSITE-3432 admin page for verifying connectivity