Name resolution logic fix

If the `GLOBAL.graylogHost` is already an IP address there is no reason to try DNS resolution (which fails anyway).