#14814: ipaddress: refactor dup code, minor janitoring, bump coverage

- remove duplicate netmask/hostmask code
- make two ifs more pythonic
- remove packed property for networks
- some minor pep8 stuff
- Test coverage is now at 97%, the rest are mostly unreachable safeguards.
2 files changed