Optimize index creation for Mnesia set tables

ETS bag tables have very poor performance on insertion if you have lots
of rows with duplicate keys, since it has to check each existing record
and make sure it's not inserting any duplicates. This can lead to some
pretty drastic slowdowns when inserting lots of rows into an Mnesia
table, IF you're introducing lots of duplicate values into an indexed
column.

As it turns out, we can fix this by switching to duplicate_bag tables
for storing Mnesia indexes on tables of type 'set', and it ultimately
makes no functional difference since we will never actually attempt to
insert any duplicate records anyway. (We would have to make some bigger
changes to make this work for Mnesia bag tables though, so that is left
as a possible enhancement for the future.)