Add missing synchronization on replicaCursors in FileChangelogDB class

git-svn-id: https://svn.forgerock.org/opendj/trunk@11015 41b1ffd8-f28e-4786-ab96-9950f0a78031
OPENDJ-1487 CR-4580 Prevent opened cursors when cleaning the file-based changelog

Prevent race condition by proper synchronization in 
FileChangeLogDB#shutdownDB() method

git-svn-id: https://svn.forgerock.org/opendj/trunk@11016 41b1ffd8-f28e-4786-ab96-9950f0a78031
OPENDJ-1548 (CR-4579) In changelog backend, persistent searches should perform the same validations as normal searches

Added validation for changes only persistent searches inside ChangelogBackend.registerPersistentSearches().
For cookie based searches, cookie is now stored on the CookieEntrySender object rather than as a search operation attachment. This makes code easier to read and understand.


Backend.java
In registerPersistentSearch(), now throws DirectoryException.

LocalBackendSearchOperation.java:
Consequence of the change to Backend.registerPersistentSearch().

ChangelogBackend.java:
Added validatePersistentSearch() + called it from registerPersistentSearch().
Added cookie field and setCookie() to CookieEntrySender + removed COOKIE_ATTACHMENT constant + changed code that was using it + no longer pass cookie down method calls
Renamed initializeAttachements() to initializeEntrySender() + fixed a bug with the starting phase.

git-svn-id: https://svn.forgerock.org/opendj/trunk@11017 41b1ffd8-f28e-4786-ab96-9950f0a78031