MDL-67861 libraries: Refactor is_ip_in_subnet_list in ip_utils