Add projectFreshSortExpressions rewriter
Further dismantle inlineProjections

It no longer produces WITH * clauses, the reason being that they
were making it harder for the planner to reason about arguments
that need to be fed into a tail planner query.

Instead, the planner query builder will squash two planner queries
together if the intermediate projection is a simple identifier
to identifier mapping.
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 #2955 from jakub-/fresh-name-rewriters

Fresh name rewriters
Merge pull request #2963 from tinwelint/2.2-undo-close-on-append-failure

No longer closes txId on append failure
Changes synchronization between LogFile and TransactionAppender

such that transactions cannot be appended and rotated away before properly
applied and closed. TransactionAppender now grabs the same monitor while
appending, as LogFile does when rotating.