Actually, the gazetteer output doesn't need this.
Implemented pgsql ID tracker.
Moved more logic for done/pending status into output.

NOTE: tests don't yet pass - there are 3 failures in the regression
suite. Note sure yet what's causing these.