This nicely bundles data we need for indexing tx history, UTXOs etc. without having to recompute things like tx_num, is_coinbase etc. We use this in GroupHistoryWriter.
Also compute input_nums in prepare_indexed_txs, which atm is unused but will be necessary for indexing UTXOs. In the future, this function would also be a place where optimizations such as caching or multi_get could be employed to speed up the indexer.