Improve performance of Principal.member_of scope

The 'join' turns to be slow for large numbers of members (>20k). Using a
sub-query like in Principal.not_member_of is more efficient and performance
is the same for smaller values.

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4013139