doc: add etcd-lock into libraries-and-tools.md

Lock implementation for etcd. It has three go routines:
    a) acquire - loop that watches for the lock to be free and tries to acquire it.
    b) watch - to watch for lock changes
    c) refresh - to refresh the ttl when the lock is acquired

All the changes in lock ownership are notified on the events channel. Any feedback welcome!
Merge pull request #1815 from ravigadde/patch-1

docs: add etcd-lock into libraries-and-tools.md
raft: add TestUnstableFirstIndex
raft: add TestUnstableLastIndex
raft: add TestUnstableMaybeTerm
raft: print out term in decimal format
Merge pull request #1843 from yichengq/248

raft: print out term in decimal format
Merge pull request #1842 from xiang90/unstable_test

raft: add TestUnstableFirstIndex
raft: add TestUnstableRestore
raft: add TestUnstableStableTo
raft: fix error message format in test
Merge pull request #1844 from xiang90/testunstable

Testunstable
raft: more logging
Merge pull request #1846 from xiang90/raft

raft: more logging
raft: fix log format in sendAppend
Merge pull request #1848 from xiang90/raft_log

raft: fix log format in sendAppend
raft: return 0 for term of compacted index

It is necessary to make this check because of the following case:

1. memory storage contains ents from index 0 to 50, and unstable has
ents from index 50 to 60.
2. raft receives an incoming snapshot with index 100.
3. raft restores its unstable to 100, but has not applied snapshot on memory storage.
4. raft receives an out-dated MsgApp from index 60.
5. raft finds the term of index 60 to check the match.
6. raft asks memory storage about the term of index 60 after it failed to get
it from unstable.
7. memory storage panics because it knows nothing about index 60.
Merge pull request #1850 from yichengq/247

raft: return 0 for term of compacted index
testing
fix