Added custom AND/OR logic for triggers. WIP

Needs a bit of testing, and also the list of triggers in the logic
metabox doesn’t update when you add a new step, until you refresh the
page.