feat(transaction): provide support for automatically committing or rolling back a transaction based on the resolution of a promise chain (closes #1939)