(#22804) Check for encoding support more robustly

The REXML module, when included outside of a module or class, will
create a ::Encoding module on ruby 1.8.7. That caused the encoding
conversion code to mistakenly think that it was running on a ruby that
supported encodings (which 1.8.7 does not). By being a bit more specific
on this check we can avoid mistaken attempts to control the encoding of
the string.
Merge pull request #1978 from zaphod42/issue/stable/22804-improper-encoding-support-detection

(#22804) Check for encoding support more robustly
(#22810) Fix rpm provider query method

Background: commit e96ac6b6abb9f387e9b8cd097b024aaa4bc656ee inadvertently
broke the rpm provider query method by wrapping the format in both single
quotes and surrounding double quotes.

This patch restores the quoting behavior prior to the above commit
while preserving the additional field introduced in that commit.
Merge pull request #1982 from kylog/issue/stable/22810-rpm-provider-query-method-returns-leading-quote

(#22810) Fix rpm provider query method
(docs) Clarify Windows' handling of primary groups
(#22847) Restrict WMI group / user queries

 - Querying win32_useraccount or win32_group on a domain can yield
   a large request to AD for user / group objects, that may number in
   the tens of thousands in large organizations
 - This can cause a lot of stress on AD and the network to retrieve all
   of these results, which are ultimately unused in the existing code
   anyhow
 - The solution involves simply restricting the queries to the local
   machine
Merge pull request #1986 from nfagerlund/windows_primary_groups

(docs) Clarify Windows' handling of primary groups
Merge remote-tracking branch 'ethan/ticket/stable/22847-windows-adsi-restrict-wmi-queries' into stable

* ethan/ticket/stable/22847-windows-adsi-restrict-wmi-queries:
  (#22847) Restrict WMI group / user queries