correct output-tx loop so that it interates over all outstanding tx on list.

While developing a tx logger for an expanded app-layer protocol I encountered lost log messages on long lived sessions that contained many transactions.  This change eliminates the loss of logs.

Log loss occurs when tx_id advanced beyond total_txs because some already logged txs had been freed.