Fix a bug with the GeoServer DB connection

This commit will fix a bug in the GeoServer extension which causes the
DB extension to become invalid after a restart of the DB server. Fixed
by actively detecting the broken connection and creating a new
connection