ring-buffer: use commit counters for commit pointer accounting