first part of big refactor - rewriting storage engine to use a new secondary index to keep track of current version of each row