Merge pull request #42 from yifan-gu/unitest

More testing on instance state machine
test(instance_test.go) finish testing handlePreAccept and handleAccept
test(instance_test.go) change instance.rowId = instance.replica.Id+1, in some cases
test(instance_test.go) add unitest for handlePreAcceptOk and handlePreAcceptReply
doc(instance.go) modified a comment
test(instance_test.go) cover more path in TestHandlePrepare and TestHandleCommit
test(instance_test.go) add TestHandlePrepareReply to cover handlePrepareReply
test(instance_test.go) add tests to cover prepare-reply helpers

add TestUpdateReocveryInstance
add TestHandleCommittedPrepareReply
add TestHandleAcceptedPrepareReply
add TestHandlePreAcceptedPrepareReply
chore(instance.go) handleAcceptedPrepareReply

Instead of panic we should just return if
recoverInfo.ballot is equal to the ballot of the prepare-reply.
See issue #45
chore(instance.go) handlePreAcceptedPrepareReply

Omit setting identicalCount to zero, We can just leave the identicalCount
not changed. see issue #45
test(instance_test.go), everything in instance.go is covered

add test for makeRecoveryDecision
add test for some getters of the instance

more behaviour tests on prepare is still needed.
test(data_test.go) cover all Replica() and Instance()