(#17710) Refactor the IP module

@jeffmccune I've recreated this pull-request and fixed the previous method missing issue. Sorry about that.

I can't view the failed CI job. Is there any way I can launch a CI job so I can test myself?

For recording puproses, here's a link to the old pull: https://github.com/puppetlabs/facter/pull/406