[PE-1788] Use safe_yaml for report parsing

This patch changes the report parsing code to use safe_yaml
to prevent security vulnerability. As safe_yaml deserializes
into basic data types only, further changes were needed
to transform the deserialized data into structure expected
by the original code.

This commit comprises the following commits that were backport from pe-puppet-dashboard/master to puppet-dashboard/2.8.4:

https://github.com/puppetlabs/pe-puppet-dashboard/commit/5b5f56335670eaecc4f1428a1a3a44af68c868b8
https://github.com/puppetlabs/pe-puppet-dashboard/commit/1bc12fd5f1d94efa38f934fa24971f8fa8d25eb7
https://github.com/puppetlabs/pe-puppet-dashboard/commit/38caf9119c4c122404555ce99ccae268a7e6a1af

We are now less strict about this specific case.