WIP refactor remove raft singleton

The final goal is to move raft related codes into a separated package.