Fix EZP-21599: content/publish transaction counter error

The beginTransaction() step in the content/publish operation
was left uncommited if a publish/before trigger interrupted
the workflow.

This adds an 'on-interupt' key for the trigger definition,
that accepts as an argument a method definition.

The pre_publish trigger in content/publish defines commitTransaction
as the callback method, committing the unfinished transaction.