Make sure TransactionInvokerImpl chain is properly protected
TransactionChains require single-threaded access, most notably
their close() contract requires that there be no outstanding
transactions.
There is a slight possibility of us violating this contract by
invoking close() while there is some command processing going
on.
Make sure we are properly synchronized when invoking the close()
call.
Change-Id: Idacc7096af448dc3a935ca3aa7ea2452bbd0135e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>