automatic shutting down of registered Prolog engines when finishing the JVM