(#19514) Add $trusted as hash with trusted node data

This adds a new feature where it is possible to opt in to getting a top
scope variable $trusted to contain a hash of trusted data.

The setting that controls this is called hashed_node_data (it is
intended to later also be used for hashed facts as well as the hashed
trusted data; hence its more generic name).

The variable $trusted is only available if :hashed_node_data is set to
true (the default in 3.x is false).

The hash contains the key 'authenticated' which is always set to one of
'remote', 'local' or boolean false. The key 'clientcert' is set if
'authenticated' is set to 'remote' or 'local'.
(#19514) Fix issues in trusted data support when running tests

Other tests were passing nil as node and there were no protection
against nil node in the new indirector code.
(19514) Fix failing tests for expectations of not setting trusted

Some tests did not expect a call to Node.set_trusted_data. This commit
now only sets this if Puppet[hashed_node_data] is true.
(#19514) Fix up tests that were not providing a valid Node

Several of the tests were not providing a valid Puppet::Node object when
they called the compiler. They were either providing nil, or a mock.
This resulted in invalid calls and failing tests when the internals of
the compiler were changed. Instead of changing the internals of the
compiler for this invalid way of being called, this changes the tests
and makes the compiler assume that it is working with good parameters.
Merge branch 'hlindberg-feature/issue-19514-trusted-facts'

* hlindberg-feature/issue-19514-trusted-facts:
  (#19514) Fix up tests that were not providing a valid Node
  (19514) Fix failing tests for expectations of not setting trusted
  (#19514) Fix issues in trusted data support when running tests
  (#19514) Add $trusted as hash with trusted node data

Closes: GH-1991
Merge branch 'ticket/22833-document-file_bucket_file' of git://github.com/pcarlisle/puppet

# By Patrick Carlisle
# Via Patrick Carlisle
* 'ticket/22833-document-file_bucket_file' of git://github.com/pcarlisle/puppet:
  (#22833) Document file_bucket_file REST interface

Conflicts:
	api/docs/http_api_index.md
(#22846) Add json schema for node
(#22846) Document node endpoint