actually use allowed_hosts config value

When using VMs with tap devices you can create various network configurations where hard coded IP address check for localhost is no longer sufficient (e.g. during log upload). There is a configuration value 'allowed_hosts' in openqa.ini, but it actually is not used anywhere.
This pull request add the missing support for allowed_hosts configuration. If not set, IPv4 and IPv6 localhost is used as default. Test included.