Throw TransactionTimedOutException in case of a transaction processing time out

Related to #3830, details are there.
Isn't adding a new exception class into the maintenance branch a compatibility breaking change? Especially when this exception will be propagated to the client side...