Add ForEach action which is like If but runs on all clients

Also adds a Stop action that lets you stop running, in case you only
want to run actions on the first match.
Allow matching class, name and role in If action
Add window type to If as well

This one required some extra helpers so is separate commit