Removes deprecation warnings in Rails >= 3.1.

Replaced `.set_table_name` with `self.table_name=` method to avoid depracation warnings in Rails >= 3.1.
Fixed `UniqueNameValidator#unique?` to check uniqueness only with other records (banyan_single_group_model_spec:12 was failing without this fix).