(PDB-772) Modify the facts endpoint to return structured facts

This pull request causes the v4 facts endpoint to return typed and structured
facts while leaving the v3 responses stringified as before.  It also adds a
"name" column to the fact_paths table representing the first element of a
fact's path.  This column should be renamed to "fact" in the future to avoid
confusion with the many references to 'certname' as name.
@grimradical the ordering is required, its part and parcel with trying to keep streaming and the transformation of multiple rows sane. We are trying to be very tricky here, and return multiple rows that amalgamate in a streamed way into discrete maps/arrays/combinations thereof. Thus we want things bunched up by name & certname as these are the primary key for the facts end point.

The problem we've discovered however, is that when you order by value, which within a single 'record' may differ wildly, all the explicit ordering of rows to make the streaming happen goes out the window, since an outer subqueries 'order by' declaration, overrides the inner one. Our streaming code can no longer re-assemble the maps/arrays and such on the fly.

One thing that is a truth though, ordering by value is uncertain/ambiguous now anyway since we have maps and arrays. So at least one reduction of the problem is to remove value ordering, and only allow the items such as name, certname and environment to be part of the ordering. This reduces the problem (we just need to merge the order by's then instead) but is not backwards compatible for v2 & v3 I believe.