Rewrite plans with Apply/Optional/Expand to use OptionalExpand instead.
Merge pull request #3305 from pontusmelke/unnest-optional

[2.2] Rewrite plans with Apply/Optional/Expand to use OptionalExpand instead.
Fixes issue in BufferedCharSeeker with false negatives from #seek

happened when last character on a line would be a delimiter.
Corrected some minor pom blemishes
Moves CSV reader/parser from batch importer to separate component

because it's a rather separate concern as a whole. There is benefit having
a CSV reader and parser available and accessible without the need to pull
in the neo4j kernel as well.
Merge pull request #3308 from tinwelint/2.2-csv-own-component

Moves CSV reader/parser from batch importer to separate component
Expose a way to ask a lucene index to sample index selectivity

o Scan a sample of index entries and compute uniqueSampledValues / sampleSize
Add a new CountsKey for index entry counts
Maintain index update counts from index proxies

o OnlineIndexProxy will ensure that the index counts are updated
o Fix bug when generate LazyIndexUpdates to never construct 'overlapping updates'
o Cleanup code in LazyIndexUpdates
o Make sure we update index update counts during population
Add minor version to CountsStore such that we can flush safely on index flip (outside of log rotation)

o Ensure we compare CountsKeys correctly by type
o Fix reading of index keys
o Add flushIndexCounts() to IndexStoreView
Remove index counts when dropping an index
Make index stats part of SchemaRead and add indexNumberOfEntries

Rationale: For planning to be sane, indices shouldn't appear or disappear out of nowhere, hence we need to be tied to the schema read lock
Add IndexStatisticsTest
Add prototype of IndexSamplingController
Hack IndexStatisticsTest to accept off-by-one caused by race from IndexPopulationJob
Pass on transaction id to index updaters
Pull out and refactor IndexCountVisitor from CountingIndexUpdater
Only apply index count updates for unprocessed transactions during recovery

o Rename updateXYZ to incrementXYZ CountsStore related methods
o Push transactionId down to IndexUpdaters (and couple them to process only updates for a single transaction)
Replace use of LongRegister with DoubleLongRegister in counts store
Add new type of IndexKey for storing sampling results