(Maint) Use --api instead of generic --query in yardopts
(#14872) PMT respect environment's module path

This patch fixes the Puppet::ModuleTool#set_option_defaults method such that
it respects the specified environment (if any) when determining the default
value for the --target-dir (the modules install directory) option.
The patch overhauls the entire method in the process to make it more readable,
and it also updates relevant unit tests and adds a pair of new acceptance
tests.
Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'

* mruzicka-ticket/master/14872-PMT-respect-environments:
  (#14872) PMT respect environment's module path
(yardoc) Fix mixup of 'is' vs. 'should' in Type#[](name) yardoc.

The method was documented to return the 'is' value when it should have
been the 'should' value. This commit corrects this.
Revert "Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'"

This reverts commit 832dc76fe7305e3efebd4220498ad0353fbf8ab8, reversing
changes made to 7490e18b915b50f7ee0204332d5dad20408cc8f1.
Update PUPPETVERSION to 3.1.0-rc1
Merge branch 'fix/master/14872_revert_pmt_modulepath'

* fix/master/14872_revert_pmt_modulepath:
  Revert "Merge branch 'mruzicka-ticket/master/14872-PMT-respect-environments'"
Merge branch 'release/3.1.x/3.1.0-rc1'
(#18440) Don't make class methods private

Previously, the launchd service provider `enabled?` instance method was
calling the `launchd_overrides` private class method, which is not
allowed. This issue wasn't noticed, because the spec test was overly
stubbing the provider.

This commit makes the class methods public to avoid these sorts of
problems in the future.