Improve testing of exclusion of inherited roles.

The list_domains_for_user() method is supposed to only return the
domains for which a user has a role (direct or via a group).
However, it currently ignores the inherited attribute, hence will
incorrectly return domains which only contain inherited roles.

This patch adds a test to show the error, a follow-on patch will
fix it.

Partially implements: bug 1390640

Change-Id: I71e118741919e9e488d9b9fd1e0b59999bb229fe
Merge "Improve testing of exclusion of inherited roles."