Fixes #2524 This PR addresses the issues expressed in #2524, in that it: * checks if a server has advertised a FQDN it can be reached at and if that FQDN hosts Matrix's client APIs * uses room aliases instead of room IDs, in order to avoid a badge being impossible to generate if the server that created the room leaves it This includes a breaking change to the badge endpoint.