Fix HHH-8930 - rebuildSessionFactory leaking resources

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