etcdserver: correct X-Etcd-Index header

This adds an EtcdIndex field to store.Event and uses that as the header
instead of the node's modifiedIndex. To facilitate this in a non-racy
way, we set the EtcdIndex while holding the lock.
transport: fake out certificate parser

The work being done in the tests is completely wasted, as we do not
need to test the udnerlying x509 library. Faking out the parser function
allows the tests to run much faster without having to carry massive
fixtures, either.
raft: node ignores unexpected local messages receiving from network
Merge pull request #1145 from coreos/fix_panic

raft: node ignores unexpected local messages receiving from network
Merge pull request #1144 from bcwaldon/TLS

Simplify TLS testing in transport pkg
Merge pull request #1082 from jonboulle/1082_x_etcd_index

X-Etcd-Index returns the node's modifiedIndex
etcdserver: eliminate race in sync test
Merge pull request #1134 from jonboulle/1134_flaky_test

flaky test TestSyncTriggerDeleteExpriedKeys
Added link for etcd-backup
raft: stop tickElection when the node is not in peer list

This prevents the bug like this:
1. a node sends join to a cluster and succeeds
2. it starts with empty peers and waits for sync, but it have not
received anything
3. election timeout passes, and it promotes itself to leader
4. it commits some log entry
5. its log conflicts with the cluster's
raft: move logic to separate func
Merge pull request #1148 from ThomasAlxDmy/master

Add link for etcd-backup
etcdserver: correct timeout and streaming handling

This reintroduces the 'stream' parameter to support long-lived watch
sessions. These sessions respect a server timeout (set to 5 minutes by
default).
etcdserver: use Context to communicate timeout, and add tests
etcdhttp: add test for streaming watches
etcd: warn on deprecated flags
Merge pull request #1138 from jonboulle/1138_timeout

etcdserver: handle watch timeouts and streaming
Merge pull request #1149 from unihorn/137

raft: stop tickElection when the node is not in peer list
scripts: consolidate and standardize protobuf generation
etcd: override flag usage func

No need to communicate deprecated flags, so prevent them from getting
printed in the usage info.