Enforce hostgroup/role uniqueness on User relation

This PR is a replacement for a composite primary key on the user_hostgroup and user_role tables. Since rails does not support this, uniqueness is programatically checked. After this is applied, an user will not be able to have duplicate hostgroups or roles. 

The little change on users_controller is because that could violate this constraint and it's better to not violate it from the beginning.