use bulk api for reindexing memberships

this improves the performance for objects that have a large number of
memberships