(#22530) Support both YAML and PSON

The problem with the previous version of this code was that it only
allowed the report to support exactly what the user had selected. This
is alright (for the most part) for the agent, but is incorrect for the
master since the master needs to understand both formats at once. The
remedy this the default_format is now selected based on the
report_serialization_format setting whereas the supported_formats are
always both PSON and YAML.
Merge remote-tracking branch 'andy/issue/stable/22530-master-with-older-agent-sending-reports' into stable

* andy/issue/stable/22530-master-with-older-agent-sending-reports:
  (#22530) Support both YAML and PSON