Progress towards flexible permissions

Checkpoint.  Nothing has changed yet, but we are beginning to introduce
more general machinery for permission definition.

Fleshed out the standard AccessControlTests, since we're about to
rewrite some key code.