Fixes #3860 - automated discovery provisioning

Replaces https://github.com/theforeman/foreman_discovery/pull/97
Does it really make sense to have this in lib? We've been moving code out of lib in foreman-core. Perhaps it should be in the DiscoveryRule model?