added a check for "bytes is str" in the IpAddressAdapter _encode, as it
was not working in python 2.x, also added some unit tests for the
adapter