(Issue 655) Memberships Libraries

* Added pluggable search filter for libraries
* Improved authz logic in groups
* Added ability to lazy-build libraries
(Issue 655) Fixes from self-review, tighten some unit tests and clear obsolete stuff
(Issue 655) Review followup
(Issue 655) Fixes from another self-review
(Issue 655) Review followup
(Issue 655) Review followup
Merge branch 'issue-655'

* issue-655:
  (Issue 655) Review followup
  (Issue 655) Review followup
  (Issue 655) Fixes from another self-review
  (Issue 655) Review followup
  (Issue 655) Fixes from self-review, tighten some unit tests and clear obsolete stuff
  (Issue 655) Memberships Libraries
Merged master into 656-terms-and-cond