OPENDJ-1116 Introduce abstraction for the changelog DB
ChangelogDB.java:
In removeDomain(), now throws ChangelogException.
JEChangelogDB.java:
In clearDB(), only clear the DB if the directory exists on disk.
In removeDomain() and shutdownDomain(), removed the entry associated to the baseDN key.
In removeDomain(), now throw ChangelogException + moved exception handling to ReplicationServerDomain.clearDbs().
ReplicationServerDomain.java:
In clearDbs(), moved the exception handling here from lower level JEChangelogDB.removeDomain().
ReplicationDbEnv.java:
Added allDbs and isShuttingDown fields to record all created Databases and mark when shutting down is in progress.
In openDatabase(), throw exceptions when the DB is shutting down.
In shutdown(), close all the opened DBs.
Added closeDB() and newErrorMessage().
In clearGenerationId(), clearServerId() and deleteFromChangelogStateDB(), now throw ChangelogException.
In clearDb(), changed parameter from String to Database.
DraftCNDB.java, ReplicationDB.java:
In clear(), rely more on ReplicationDbEnv.clearDb(Database).
In isDBClosed(), added more conditions.
ReplicationTestCase.java:
Removed useless call to cleanUpReplicationServersDB() before removeReplicationServerDB().
Added remove(Collection<ReplicationServer>) to factorize code between removeReplicationServerDB() and remove(ReplicationServer...).
ReplicationServerTest.java:
Removed all calls to clearChangelogDB() before calling changelogBasic(), because this is the first thing the latter method does.
Added getCSNFieldName() to have more explicit failures.
In windowProbeTest(), used HostPort.
ECLServerHandler.java:
Removed never thrown DirectoryException.