No longer closes txId on append failure

since we now distunguish between committing and committed txId. The
appender gets a next committing txId, which is just a candidate for
committing. So in case of failure to append there's no transaction to
close since it's not marked as committed. Marking as committed is the last
operation of appending.

This issue would be observed by having a transaction failing to append to
the log, to the go and shut down the database. The database would await
last closed transaction to be the same as the last committed, and since
last closed would be lastCommitted+1 that would never happen.
Merge pull request #2963 from tinwelint/2.2-undo-close-on-append-failure

No longer closes txId on append failure
More information in AIOOBE
Store application ordering of transactions w/ legacy index changes

Only a single transaction at a time can append to the log buffer, but
multiple transactions can apply changes onto the store simultaneously in
2.2. For graph and schema indexing changes there are the high level
entity locks that guarantee correct ordering of transactions wanting to
change the same records. However for legacy indexes there are no such
ordering. This might result in for example an REMOVE+ADD turning into a
ADD+REMOVE, i.e. two different end results.

So, this commit introduces ordering of transactions making any legacy
index changes so that such transactions gets applied in the same order
as they were appended to the log. Transactions that doesn't change
any legacy indexes will not be ordered like this and will pay no cost
whatsoever for the ordering introduces here.

This commit also adds apply() to NeoCommandHandler such that
CommandApplierFacade can call a round of apply() to all appliers and the
another round of close(). This fixes an issue where store application
locks would be released too soon.
Previously:
  * apply graph changes
  * release graph update locks
  * apply schema index changes
  * apply legacy index changes

Now:
  * apply graph changes
  * apply schema index changes
  * apply legacy index changes
  * release graph update locks