Return an error when a non-existing tenant is added to a user

Currently, if a user is created without a tenantId, adding a
non-existing tenantId to that user succeeds.  This change
checks for whether the tenant exists in cases where the check
was previously skipped.

Closes-Bug: #1246473

Change-Id: I2a814c5df902a97297ad05950ae4205664ddf6e6
Merge "Return an error when a non-existing tenant is added to a user"