How to replace the default logical database instance

This is a last resort solution.

Normaly, if there are no issues or bugs reloading the logical database should be enough.

This script replaces the default logical database instance.

Can be useful to:

- use a logical database defined in a different location

- recover from errors that leave the default logical database in a broken state.

currentDatabase := LeDatabasesRegistry default defaultLogicalDatabase.
currentDatabase saveProperties.
databaseProperties := currentDatabase properties.
LeDatabasesRegistry default stopMonitoring.
LeDatabasesRegistry default 
	defaultLogicalDatabase: databaseProperties logicalDatabase.
  

After changing the logical database instace, we need to update all worlds as they hold a reference to the default database (How to update the content of all opened GtWorld instances)

GtWorld allInstances do: [:each | each knowledgeBase: LeDatabasesRegistry defaultLogicalDatabase ].