Fix misc. issues reported by Coverity.

Some uninitialized values, a possible null pointer dereference, and
time-of-check-time-of-use on reading random seed file.
Add check for sqlite3 command to tests that require it
Fix more Coverity-reported issues (introduced by internal error audit).

Mem leaks and a null pointer deref (not actually expected to occur
unless already in one of the the odd states that warrants an internal
warning/error).

Also dead code.
Merge remote-tracking branch 'origin/fastpath'

* origin/fastpath:
  Fix more Coverity-reported issues (introduced by internal error audit).
  Add check for sqlite3 command to tests that require it
  Fix misc. issues reported by Coverity.