code: void resetState(Log log) {
      nextSnapshotIndex = 0;
      nextSnapshotOffset = 0;
      matchIndex = 0;
      nextIndex = log.lastIndex() + 1;
      heartbeatTime = 0;
      heartbeatStartTime = 0;
      appending = 0;
      timeBuffer.reset();
      configuring = false;
      installing = false;
      appendSucceeded = false;
      failures = 0;
    }
docs: Resets the member state.