PostgreSqlSegmentStore: quicken solution store

Store solutions in two queries. Add timer to solution storing. Storing
solutions is now 40x faster.