read-cache: relocate and unexport commit_locked_index()