(PDB-900) Make performance improvements to fact_values GC process

Switched from a background thread to cleanup orphaned fact_values to one
that deletes as it goes. Switching to deferred constraints also
significantly improved performance on PostgreSQL. The same facilities are
not available in HSQLDB, but I have alternate queries that work, though
will likely not be as fast.
Merge pull request #1094 from senior/ticket/stable/pdb-900-fact-value-cleanup

(PDB-900) Make performance improvements to fact_values GC process