OPENDJ-1801 (CR-6815) Revise usage of storage.open() and startImport()
This change brings back to life the usage of Storage.startImport() for the import.
pluggable/spi/Importer.java:
Added read() and delete().
Storage.java:
Changed exception thrown from startImport().
PersistItStorage.java, TracedStorage.java:
Implemented the changes in Storage and Importer.
Index.java, DefaultIndex.java, Importer.java:
Used Importer instead of WriteableTransaction.
Importer.java:
For import, used Importer instead of WriteableTransaction.
In processIndexFiles(), closed the storage before starting the import.
In IndexDBWriteTask.endWriteTask(), called DNState.finalFlush() instead of DNState.flush().
In DNState, added finalFlush().
ID2Count.java:
Added importPut(), importPutTotalCount() and importPut0() methods for import. It is sad but they duplicate a bit the WriteableTransaction ones.