FFI: update the jobset while in transaction

Introduce the job set with reference counting, compatible with Ur/Web
transaction model