(#19845) Allow a block to be supplied as a confine

Allows a confine to take only a block parameter like:

confine { File.exist? '/bin/foo' }

Or take a fact name and a block:

confine :ipaddress do |addr|
  require 'ipaddr'
  IPAddr.new('192.168.0.0/16').include? addr
end

This is similar to what Puppet allows in provider confines.

Backported onto facter-2 by Adrien Thebo <adrien@puppetlabs.com>

Conflicts:
	lib/facter/util/resolution.rb
	spec/unit/util/resolution_spec.rb
(doc) Update the Resolution#confine API docs

Without this patch, the API documentation for the
Facter::Util::Resolution#confine is a bit muddled and confusing.  This
confusion is caused by the different, overloaded, forms of arguments
that #confine accepts.

This patch addresses the problem by using the @overload YARD tag to
separate out each form, document the arguments for each form, and
provide a clear example for each form.

Back ported onto facter-2 by Adrien thebo <adrien@puppetlabs.com>

Conflicts:
	lib/facter/util/resolution.rb
Merge pull request #620 from adrienthebo/backport/facter-2/confine-blocks

Backport/facter 2/confine blocks