Move the code here and there
This patch rearranges raft structures an their responsibilities. It enhances the "low coupling - high cohesion" balance.
The whole patch is divided into small atomic commits, each introducing a single change:
- introduce intermediate InnerNode struct
- access RawNode through InnerNode
- move notifications code into InnerNode
- encapsulate InnerNode initialization
- move most of Node functions into InnerNode
- retain RaftSpaceAccess in InnerNode
- shorten errors text
- move ready state handling into InnerNode
- move conn_pool to the InnerNode
- postpone proc termination during expel
- move main_loop into the InnerNode