(#7986) make solaris pkg versionable.

Changes:
  * Add :versionable and :upgradable to features
  ** Ensurable now returns version rather than present/absent
  * Enable :defaultfor solaris 5.11
  * Change update to use pkg update, and ensure that we ignore return 4
  * Update the test cases to reflect these.
(#7986) check if pkg is the default provider for opensolaris

Modified pkg_spec test case to verify that pkg is the default provider for opensolaris
Merge branch 'ticket/3.x/11004_pkg_provider' of git://github.com/vrthra/puppet into 3.x

* 'ticket/3.x/11004_pkg_provider' of git://github.com/vrthra/puppet:
  (#7986) check if pkg is the default provider for opensolaris
  (#7986) make solaris pkg versionable.
(#7788) Cache paths from older rubygem versions

Older rubygems seem to have a problem where they begin looking for files
in the wrong locations after a few calls. This showed up in the spec
tests as several failures in different failures, but with the following
one as the most directly showing the problem:

  1) Puppet::Util::Autoload when reloading files changes should be seen by changed? on the instance using the short name
     Failure/Error: @autoload.load("myfile")
     Errno::ENOENT:
       No such file or directory - /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/specifications/rake-0.8.7.gemspec
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:490:in `read'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:490:in `each_load_path'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:486:in `each'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:486:in `each_load_path'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:640:in `latest_load_paths'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:639:in `each'
     # /home/hudson/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:639:in `latest_load_paths'
     # ./lib/puppet/util/rubygems.rb:45:in `directories'
     # ./lib/puppet/util/autoload.rb:169:in `gem_directories'
     # ./lib/puppet/util/autoload.rb:173:in `search_directories'
     # ./lib/puppet/util/autoload.rb:96:in `get_file'
     # ./lib/puppet/util/autoload.rb:64:in `load_file'
     # ./lib/puppet/util/autoload.rb:208:in `load'
     # ./spec/unit/util/autoload_spec.rb:190
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `instance_eval'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:80:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:173:in `with_around_hooks'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example.rb:77:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:355:in `run_examples'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `map'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:351:in `run_examples'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:337:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `map'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/example_group.rb:338:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `map'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:28:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/reporter.rb:34:in `report'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:25:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in `run'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in `autorun'
     # /home/hudson/.rvm/gems/ruby-1.8.7-p334@noFeatures/bin/rspec:19

This commit caches the first call to get the paths for older rubygems.
(Maint) dont fail on path unless absolutely required.

Previously, ensure=>running was required to specify the path. However,
if the zone is already configured, we dont really need the path.
This patch gets rid of that requirement.
- adds spec tests for start.
(Maint) - simplify methods in ZoneMultiConfigProperty (adds wrap).

This patch extracts the arrification into a single method wrap,
and shortens the method definitions by removing redundant code.
(Maint) Type Zone : fix formatting, comments

Add comment explaining why ensure:retrieve is necessary, added the output
of zone info to explain the regex, Fix format space, refactored global
retrieve to make it simple and succinct, simplify autorequire(:zfs),
setstatus, updated the regex in getconfig so that it matches the output
better. Updated the test case for getconfig
(#15886) Refactor state machine

The zone type has an internal statemachine that ensures that the state
transition is linear from configured -> installed -> running.
Previously, the state machine was intertwined with the code of zone
type. This commit extracts the statemachine so that thestatemachine is
in its own class

In order to remove future confusion, we also rename newvalue to seqvalue
and ensure that the newvalue is called from within the seqvalue. The
seqvalue is so named to indicate that the order of declaration of the
seqvalues determine the order of progression of states in the state machine.
Since we call parent newvalue from inside the seqvalue, we can now avoid using
munge which was added for this reason.

- Added test cases for fsm
(Maint) simplify line2hash, ensure iptype exclusive property is correct

Updated line2hash so that the method is succinct and simple, and added test cases for it.
(#15886) remove ZoneConfig and ZoneMultiConfig

Remove the zone specific properties from types, and move their handling to the provider.
This is done so that we can avoid stepping on the toes of puppet core and override methods
that have default behaviors except when necessary. The zone type is also more cleaned up
so that it can serve as a base for other container implementations.

Type: the properties that earlier relied on ZoneMultiConfigProperty are now moved to
Puppet::Property::List. The methods should and insync? are added to override the behaviors in
the parent methods. The should method in parent joins the array values together before
comparison. However, we do not want this behavior, and instead want it to remain as an array.
Hence we override should. We also override insync?  which uses should in parent for the same
reason.

Provider: the def_prop and def_multiprop now handles the definition of properties. They
add the methods prop(), prop=(), and prop_conf() to each properties that the provider provides.

The prop_conf() method is needed for getting the text to send to zonecfg on configure.
(#15886) getstatus should rename ip-type to iptype

previously, getstatus parsed the output of zonecfg info which contained
key `ip-type`. However, we are looking for the key `iptype`. this caused
the zone provider to not detect when iptype was changed, and always assume
the default value 'shared'. This commit gets the ip-type and assigns it to
iptype.
(#15886) commit the complete commands at the end.

Previously, the provider was applying the setconfig commands as soon as
it was called. This caused problems when the commands that were being called
needed to be called in a transactional manner
(i.e eth,exclusive -> eth:ip,shared). This uses flush to pass the required
commands atonce through a pipe to zonecfg rather than do it one at a time.