Enhance wsgi to listen on ipv6 address

Check if the hostname is ipv6 and set the family appropriately.
Add tests to ensure that IPv6 and IPv6 with SSL works properly.

Change-Id: Ibcf0a9387691d124888c0c0540d4322b0a3b3d67