Throw TransactionTimedOutException in case of a transaction processing time out

Related to #3830, details are there.
@jerrinot can you please elaborate more why you are thinking like this?