Persistent Raft state.

Now Raft stores own state in a persistent storage. This commit should fix the following bug: a node may vote twice in the same term, when it restarts and forgets about the previous vote.
Fix a data race and segfault.

* Configuration machine uses proper reactor now. Before I accidentally passed wrong reactor to it, so my single-threaded code runned in two threads actually.
* Don't remove service client from the callback. As I know, most Cocaine IO objects shouldn't be deleted from the callbacks called by them. The service client is not an exeption from this rule.
* Unbind a readable_stream when an socket error occurres. It's because we don't want receive any events and anything with an invalid stream.
Don't send heartbeat if an append request is already scheduled to be sent.
Fixed serialization of raft::command_result.

Command_result should provide address of the actual leader, but I forgot to serialize it.
Some comments and log messages.
Don't cancel just posted error.

It was a good idea to stop watching a socket when a socket error occurs.
But it's a bad idea to cancel the callback which should notify about the error.
Merge pull request #119 from andrusha97/raft-bugfixes

Persistent RAFT state and bugfixes