Could `riakc_obj:index_id_to_bin` be used here, instead of duplicating that logic?

These `mapred_stream` clauses could maybe even be collapsed into one clause, matching `{index, Bucket, Index, Key} ... when is_tuple(Index)`.