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

This allows for ip-addresses in allowedHosts and I think it will fix the problems we're having with Travis (#180).