Transaction: document state attributes; unify code when ending in ..set_source_options(), ..emit_add(), ..emit_remove(), ..emit_nothing()