Cache user groups and merged permissions. Fixes #194.