Fix term+index rpc guards
Currently when performing rpc requested by governor we first check that current term matches and than wait for requested commit_index. This allows for incorrect behavior in some scenarios, e.g. when the log is rolled back between the term and commit_index checks. We should instead wait for the commit_index and than check the commit's term matches the requested one.