[tvheadend] Add support for imagecaching

Ok, tidied up a bit.

I've created a generic routine in HTSPConnection to build TVH webserver URLs given a specific resource (protocol, auth, host, port and webroot are added by the routine).