rgw: fix replica log indexing, extend log api