Protocols on eCash are specified using a LOKAD ID, a 4 byte identifier. There are a few popular protocols, like SLP and ALP, however, it's not easy adding other protocols them as the infrastructure is not quite ready.
This diff adds a simple index, which finds txs with LOKAD IDs and groups them. A UTXO index is not added because LOKAD IDs are per-tx, not per-output.
The index is enabled by default, however, existing instances without the LOKAD ID index will have to manually specify -chroniklokadidindex=1, which will reindex the LOKAD IDs from genesis.
Specifying -chroniklokadidindex=0 manually on an instance with the index enabled will wipe the index.
This index is also useful for the Plugin interface, i.e. when a plugin is added for a LOKAD ID, we know exactly which txs will have to be indexed already and don't need to search all blocks again.
Depends on D15913.