clean up db session utility code
clean up db session utility code


Former-commit-id: e0b4edd2e731b9312175ad80ec9bea9cb1ef58fb [formerly d26076180762f55ccaeea1a03d6498219cd50d74]
Former-commit-id: 141bde8d7db833850d6c09259c5d8b0fc51caa21
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine