Rename tests
Fix a bug found by @endor; add tests to verify

Plus some additional tests for related concerns and some IPv4-specific tests.
Fixes for v4/v6 subnets

And also be opinionated about correctness of subnets with leading zeroes.