(#23369) Allow caller to override YAML.load_file returning false

According to https://github.com/tenderlove/psych/issues/149, Syck and
Psych return false when ::YAML.load_file tries to parse an empty file.

Since Puppet::Indirector::Yaml#find calls Puppet::Util::Yaml.load_file
directly, we can't change the semantics of what it returns.

Instead we allow the caller to explicitly specify what the default value
should be.
(#23369) Handle invalid CSR attribute contents

Previously, Puppet::Util::Yaml.load_file returned false when the file
was empty, causing the CSR attributes code to call non-existent methods
on `false`.

In addition, the code assumed that the YAML file contained a Hash, and
attempted to invoke non-existent methods on the loaded object.

This commit passes in a fallback value for the load_file invocation,
so that if the file is empty or contains only whitespace, we still
generate the CSR.

But if the file contains something other than a Hash, e.g. Arrray, then
we raise an exception so we don't generate a CSR with unexpected data.

Tests based on work by Josh Partlow <joshua.partlow@puppetlabs.com>
Paired-with: Adrien Thebo <adrien@puppetlabs.com>
Merge pull request #2131 from joshcooper/ticket/stable/23369-empty-csr-attributes

(#23369) Handle invalid csr attributes