Update of the puppetdb discovery plugin

Added regex functionality
Improved fact queries by transforming the multiple fact queries
into a single puppetdb request.
Cleaned up the code.