Fixed issue #1738. Provided also new OGraphDatabase.setRetroCompatibility(true) to open old database and OGraphDatabaseMigration tool to migrate it