Rewrite to puppet providers and add rich_rule type

Fixes issue #4