SERVER-8391 introduce a (indexObj x doc) -> keys function for upgrade checking