Do not hold a ToolsDB connection during archival
If the database is large enough the connection here will time out during
the dumping. Close the connection and re-open when needed instead. Also,
use defaults-file instead of parsing the my.cnf file where possible.
Bug: T358340