move uniq constraint into a scope

Fix annoying deprecation messages. :uniq constraint on has_and_belongs_to_many now needs to be in a scope