Improved HttpRESTHandler allowedHosts logic (don't use reverse lookup)

This allows for ip-addresses in allowedHosts and fixes the problems we're having with Travis (I think).