refactor(server.go) change setCurrentTerm to updateCurrentTerm
process functions should always compare the term
simplify the logic of updateCurrentTerm
remove uncessary setState
introduce _assert
Merge pull request #181 from xiangli-cmu/refactor_set_currentTerm

refactor(server.go) change setCurrentTerm to updateCurrentTerm