Training DB clean up gracefully

When closing down we left the training database open
and this caused problems when looking to implement
a restart function.

The problems stemmed from the way the QSqlDatabase
code was implemented in TrainDB which was modelled on
code in DBAccess that was cleaned up subsequently.

TrainDB code now mirrors the approach taken in DBAccess
and relinquishes resources correctly. The TrainDB is now
closed as well as being opened in main.cpp at startup.

Also, removed reference to obsolete dbconn member in the
DBAccess class definition since it is no longer used.