improve performance of ``IPNetwork.__contains__()``