Create / update memberships from capsule sync

Directory-side code for theodi/open-orgn-services#168