Destroy instance of db on shutdown (exit).