Add expect bootstrap '-expect=n' mode.

This allows for us to automatically bootstrap a cluster of nodes after
'n' number of server nodes join. All servers must have the same 'n' set, or
they will fail to join the cluster; all servers will not join the peer set
until they hit 'n' server nodes.

If the raft commit index is not empty, '-expect=n' does nothing because it
thinks you've already bootstrapped.

Signed-off-by: Robert Xu <robxu9@gmail.com>
website: Fixed semantic meaning of upstream in DNS guide
Fix merge conflict
Merge branch 'pmarkert-semantic'
agent: Fix issues with re-registration. Fixes #216
Utilise new raft.SetPeers() method, move expect logic to leader.go.

This way, we don't use EnableSingleMode, nor cause chaos adding peers.

Signed-off-by: Robert Xu <robxu9@gmail.com>
agent: Fixing missing copy of RejoinAfterLeave flag. #110
CHANGELOG updates
Minor cleanup to logic and testsuite.

Signed-off-by: Robert Xu <robxu9@gmail.com>
Fixing merge conflict
Merge branch 'robxu9-master'
consul: Minor cleanups
Fix a small typo in RPC docs.
Merge pull request #227 from pkwarren/rpc_typo

Fix a small typo in RPC docs.
ui: display session name on list of sessions under locked key
Rename Expect to BootstrapExpect. Fixes #223.
Restore the 0.2 TLS verification behavior.

Namely, don't check the DNS names in TLS certificates when connecting to
other servers.

As of golang 1.3, crypto/tls no longer natively supports doing partial
verification (verifying the cert issuer but not the hostname), so we
have to disable verification entirely and then do the issuer
verification ourselves. Fortunately, crypto/x509 makes this relatively
straightforward.

If the "server_name" configuration option is passed, we preserve the
existing behavior of checking that server name everywhere.

No option is provided to retain the current behavior of checking the
remote certificate against the local node name, since that behavior
seems clearly buggy and unintentional, and I have difficulty imagining
it is actually being used anywhere. It would be relatively
straightforward to restore if desired, however.
Add some basic smoke tests for wrapTLSclient.

Check the success case, and check that we reject a self-signed
certificate.
Fix a Makefile typo.

The broken .PHONY declaration is breaking Travis: 'make deps' is now a
no-op, because of the new 'deps' directory.
Merge pull request #235 from nelhage/fix-make-rules

Fix a Makefile typo that was breaking Travis.