Check for user membership in mapped tenant

If the autocreate users option is set we sould add the user in each of
the tenats that he is able to access.

Fixes bug 1
Add unittest for bug/1
Merge pull request #1 from alvarolopez/bug/1

Membership in various tenants/VOs is not handled correctly
Merge pull request #2 from alvarolopez/master

Merge changes from master into stable/grizzly