payment: first pass at using automata for auth/capture

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
payment: second pass at using automata for direct payments

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Temp refactoring for payment retry (to be squashed)