Design and implement an IPv4 iterator that can traverse IP addresses both forward and backward, and that supports iterating through all IPs within a given CIDR block. The iterator should expose standard iterator methods: hasNext(), next(), hasPrevious(), and previous(). The CIDR block is provided as a string in the form "A.B.C.D/E" where E is the prefix length (0-32). Internally you must parse the CIDR into its network address and prefix length, compute the range size as 2^(32-prefix), convert IPs to/from 32-bit integers for efficient stepping, and yield each IP in dotted-decimal string format. The iterator must handle edge cases such as /0 (entire IPv4 space) and /32 (single IP), and must work for ranges containing millions of IPs without pre-materializing the full list.