IPv6 support round 2

I hope that I have this right, tests now pass, further tests can be added, but this is the initial bits.

-Erinn