Fix index in AppendEntries Response and logTruncate logic.

Fixed index to use the current index in the logEntry list for the
AppendEntries Response.
In logTruncate, truncate upto the index requested (excluding the index).