Implement and unittest EndTransaction.

Added an implementation for EndTransaction which attempts to move a
transaction from PENDING to either COMMITTED or ABORTED depending on
the EndTransactionRequest.Commit argument. Various error conditions
may result, including the txn already being committed or aborted,
Epoch or timestamp regressions, or transaction retry on SSI txns
in the event that the commit timestamp is different from the transaction
timestamp.
em...you wish to allow the commit request arrive before heartbeat request. But how about the Push txn request arrives before heartbeat due to some write intent conflict? If that's the case, we won't have some necessary txn data to make a decision, e.g. the priority.

I would suggest to write txn data in a sync call before all other write intents or commit/abort requests. Thus we may reduce some race conditions.