Allow per-rule actions

This allows an action to be given for an entire rule, rather than just for individual rule lines.