Avoids some use of synchronized map in PersistenceManager

o Instead of calling PersistenceManager#currentKernelTransaction() when
  asserting the existence of a transaction, call the (now public)
  #getCurrentTransaction())
o KernelStatement is aware of the NeoStoreTransaction it was created with
  so that PersistenceManager can be avoided.

Going forward PersistenceManager should be deleted and each
NeoStoreTransaction should be tied closer to a kernel transaction. This
will be easier when all operations go through the Kernel API.
Merge pull request #1779 from apcj/dps0

Use %~dps0 instead of %~dp0.
Recognise multi-word keywords with extra whitespace

ie. "IS  NULL" or "IS\nNULL"
Fold semantic checking over collection

Rather than using the fold to build a chain of semantic check functions.
This reduces the stack requirements for semantic checking.
Merge pull request #1765 from cleishm/semantic_check_optimization

Fold semantic checking over collections
Have SubGraphExporter export uniqueness constraint. Fixes #1758.
Merge pull request #1764 from cleishm/keyword_space

Recognise multi-word keywords with extra whitespace
Merge pull request #1780 from tinwelint/2.0-less-persistence-manager

Avoids some use of synchronized map in PersistenceManager
Merge pull request #1762 from jotomo/neo4j-1758

SubGraphExporter: export uniqueness constraint.
Removed a typo.
Changed the mistakenly identified RFC to 2616 as Tim intended.
Defer unique constraint verification for better performance.

o Reading from index for before adding each new entry is expensive,
  so delay verification until the end.
o Use IndexReader.terms() to iterate though all index entries in
  sorted order and verify that total number of unique terms matches
  expected number of entries.
o Use large precision step for numeric properties; reduces size of
  index on disk, and removes superfluous terms when iterating through the index.
o Group together property encoding logic into Enums.
Keep counts accurate.
Store numbers as oridinary fields.

Use normal TermQuery instead of RangeQuery.
Make number encoding explicit.