Enhance wsgi to listen on ipv6 address

Check if the hostname is ipv6 and set the family appropriately.
Picking up the snippet from glance.
Picked up some code from nova as well to get the test case running
properly

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