SERVER-12767 refactored key generation in db/index.