OPENDJ-1116 Introduce abstraction for the changelog DB
Investigating ExternalChangeLogTest.ECLReplicationServerFullTest(), I found a bug introduced by r9538.
In DraftCNDBCursor(long) ctor, when returning null, the code did not release the readLock anymore. Previously, it threw an exception that was caught, then released the readLock and rethrown.
Problem is there was an underlying bug in the previous code too: when the DB was already closed, the readLock would not be released at all.
Now by introducing the cursorHeld local variable, the readLock is appropriately released in the finally clause when no cursor is held at all.
Also fixed the code in DraftCNDBCursor().