(maint) Add specs for parser resource parameters

Classes Puppet::Parser::AST::ResourceParam and Puppet::Parser::Resource::Param
(#23115) Include manifest context in Puppet::DevError

When a 'devfail' or Puppet::DevError is thrown, include the user's manifest
file/line context as it can help in finding the problem.
(#23115) Convert nil resource parameter values to undef

If a resource parameter evaluates to nil (e.g. a return value from a parser
function), then convert the value to undef.  This prevents an error in
Puppet::Parser::Resource::Param which requires a non-nil value on
instantiation.
(maint) Don't stand up master unless resigning.

Don't take the time to bring up a puppet master unless we intend to
recreate certs.

Also clears and resets the master's cert if it has the agent role.
There is no reason to treat the master specially in this case.
(#7243) Allow CSRs to accept a set of custom attributes

When a CSR is generated, additional information may need to be attached
to the CSR for use when the CSR is signed. This commit allows an
additional hash of OID/value pairs to be included as CSR attributes when
the CSR is generated.

To ensure that user specified attributes cannot overwrite attributes
added by Puppet itself, adding attributes that deal with certificate extension
requests will fail the CSR generation process.

Original patch by Patrick Hemmer <patrick.hemmer@gmail.com>
Merge pull request #2078 from jpartlow/feature/7243/csr-attributes-test

Feature/7243/csr attributes test
(#23183) Use FFI to manage pointers in RootCerts module

Previously, we made assumptions about the layout of the CERT_CONTEXT
structure, specifically that PCERT_INFO (pointer to CERT_CONTEXT) was an
unsigned 32-bit integer ('L'), and magically accessed the size of the
returned structure as arr[2]. We were also memcpy 40-bytes which was
larger than the size of the CERT_CONTEXT structure in both x86 and x64 and
was the cause of infrequent segmentation faults.

This commit uses FFI to define the layout of the CERT_CONTEXT structure, uses
named fields, e.g. [:cbCertEncoded], to access offsets within the structure,
and uses the FFI::Pointer#null? method to check for NULL pointer.

Note that we use FFI::Pointer and not MemoryPointer, because the
CertEnumCertificatesInStore function is responsible for freeing the
previous CERT_CONTEXT pointer, not us.

Also in the motto of "don't stub what you don't own" it exercises the Win32
APIs to make the tests more meaningful.
Merge pull request #2049 from domcleal/tickets/master/23115-param-nil

(#23115) Convert nil resource parameter values to undef.
Merge pull request #2079 from joshcooper/ticket/stable/23183-ffi-rootcerts

(#23183) Use FFI to manage pointers in RootCerts module
Merge branch 'stable'
Merge branch 'master' of https://github.com/puppetlabs/puppet