Accept instances of IP in overlaps() and __contains__. (cherry picked from commit 4411d1cdea80c8af8897fe23032338fcb53c2abb)