Add utility helper to grab single column values while bypassing object creation
Refactor purge orphans cron.

The previous version had a hardcoded limit of 2,500,000 documents and
took hours to run as a result of fetching objects from the database
one at a time and doing a linear search of documents to compare ids
each time. The new version uses a lookup hash and fetches the ids
in bulk directly from the DB. There is no document limit and run
time is well under an hour.