optimize store_key and store_index

Link: https://github.com/GeneAssembly/biosal/issues/254
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>