Make the rebuildSessionFactory() method be more aggressive about closing
everything. Particuarly calling serviceRegistry.destroy(), which
releases all of the pool connections upon failure. Otherwise they're
left hanging around to cause problems on the server.