improve error handling in database creation/connection

so if the data base is corrupted or the schema has changed then the
class handles the problem instead of reporting it.
Merge branch 'master' of ssh://dascgitolite@dasc-git.diamond.ac.uk/gda/gda-core.git