Remove dependency to main window from DBBrowserDB class

Get rid of the dependency to the MainWindow class in the DBBrowserDB
class. It was only used for calling the log SQL and set database state
functions anyway. The same result can be achieved emitting Qt slots.