When we calculate the IPv4 start node, we also need to know the netmask where we found it

This fixes the case of when a database has a subnet that contains the entire
IPv4 search range, for example ::/64.

Added tests for this.