Enhance wsgi to listen on ipv6 address

Check if the hostname is ipv6 and set the family appropriately.
Picked up the code snippet from glance to determine the address_family
per markmclain's comment
Picked up some code from nova as well to get the test case running
properly

Fixes LP# 1101341

Change-Id: I67166dc030e4ea0dd82888abfbc9db555747de27
Merge "Enhance wsgi to listen on ipv6 address"