(#3946) Add 'post_resource_eval' method to provider classes

This patch allows provider classes to implement a ::post_resource_eval
method, which will be called during the transaction after all resources
have been processed. The purpose is to have a place to peform cleanup
actions for, e.g. connections opened and shared between provider
instances.  This cleanup should be performed whether or not resources
have changed, and even if resources have failures, which precludes the
use of existing cleanup methods (like #flush).
Merge pull request #1851 from badgerious/feature/master/3946_provider_finalize

(#3946) Add 'post_resource_eval' method to provider classes