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: add TestUnstableTruncateAndAppend
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
integration: not check whether readloop goroutines exist

Readloop goroutines may be left from time to time. Skip the check for now,
and will dig into it when we have time.
raft: add msgHeartbeat type
Merge pull request #1854 from yichengq/247

integration: not check whether readloop goroutines exist
Merge pull request #1852 from xiang90/heartbeat

raft: add msgHeartbeat type
Merge pull request #1845 from xiang90/testunstable

raft: add TestUnstableTruncateAndAppend
wal: save latest state into new WAL

So we could always read out state when open at valid index.
*: add pauseMember test
integration: fix possible early fire in TestWatch
Merge pull request #1860 from yichengq/249

integration: fix possible early fire in TestWatch
*: typofixes

https://github.com/vlajos/misspell_fixer
Merge pull request #1858 from vlajos/typofixes-vlajos-20141204

typofixes - https://github.com/vlajos/misspell_fixer
Merge pull request #1859 from xiang90/pause_test

*: add pauseMember test
etcdserver: close storage when stop