Functionality to support indexing reference with tags

Some new functions to enable correlating tags with positions in sequences, for the purpose of mapping-by-alignment.