add endTxn and endRangeTxn support and switch to use sqlite4 encoding for timestamp in mvcc

Summary:
1. add endTxn and endRangeTxn function to commit or abort the write intents.
2. switch to use the new EncodeInt() of sqlite4 encoding for timestamp in mvcc.

Test Plan: go test

Reviewers: spencerkimball

Reviewed By: spencerkimball

Subscribers: team

Differential Revision: http://phabricator.cockroachdb.org/D121