Expanded the ProfileList class so it worked more like a recipe. This
helps to get rid of a lot of special cases and simplifies the code. It
also makes it possible to do things like group block.
Add an array of arguments to isReadOnly() method of actions, to let
them change their results depending on what actions are called.
Primarily used by the 'api' action. Ideally in the future that will be
multiple actions. But this might still be useful.