(PDB-565) Support PDB storage of trusted facts

This pull request enables storage of trusted facts when the trusted_node_data
flag in puppet.conf is set to true.
Merge pull request #1016 from wkalt/ticket/master/pdb-565-trusted-storage

(PDB-565) Support PDB storage of trusted facts
(PDB-747) Initial schema for structured facts support

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) Fact storage

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) cleanup after rebase

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) reduce type id conversion back and forth

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) get non-string storage working

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) Merge old migration and remove some todos

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) remove some todos

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) generalize in-clause-* functions

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) add delimiter escaping functions

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) always encode path string

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) create a consistent factset schema

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) finish encoding work

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) more cleanups

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) use maps for add-facts! and insert-facts! interfaces

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) remove unnecessary or amibguous indexes for now

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) Make storage changes compatible with hsqldb

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-708) convert all schemas to lowercase

Signed-off-by: Ken Barber <ken@bob.sh>
Created a migration and test to migrate prexisting data after structured facts migration