(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.
The motivation for the ordering comes from the streaming requirement.  Since the output is being split with factname-certname-pred, the query response needs to be pre-ordered along those lines to prevent parts of the same structured fact from being considered distinct.  Likewise we need to distinguish facts of the same name from different certnames.  Good thought on paging; I'll look into it.