sync: Move the index name generation to a helper function.
sync: Move the index name generation to a helper function.

The index name generation will need to be used by other functions
aswell, moved it to a separate helper function.

algernon/libmongo-client,algernon/libmongo-client,algernon/libmongo-client