Getting direct and indirect memberships from the membership libraries in all cases

This allows for ordered membership listings
Code cleanup in group memberships library
Added a migration script that truncates the libraries
Merge branch 'my-memberships' of https://github.com/simong/Hilary into my-memberships
Fixed up some JSDocs in the Memberships Library ordering