Specify unique/nonunique key on add_index function

It would be nice to be able to request a unique or nonunique key on indexes.  I wasn't able to find a way to make this work with the current add_index function.