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
make sure bytes is defined
removed use of bytearray for python 2.5 compatability
Merge pull request #24 from markcottrell/master

IpAddressAdapter python 2.x fix