[Chronik] Fix non-token inputs of bare burns
Summary:
Currently, inputs that have no token at all are skipped in process_non_token_tx, which is incorrect. Instead, it should add a NoToken input, as per this diff.
We also add an automatic upgrade mechanism to find and fix token txs that were incorrectly indexed, so users don't have to do a costly reindex. The upgrade takes around 3-5 minutes, depending on hardware.
Test Plan:
- ./test/functional/test_runner.py chronik_token_burn
- Run this patch on an existing instance, it will upgrade a few thousand token txs
- Test if 94ee31593d5ebc68c23c6c927752a404a0d1fc016d13a12388f12fc4c212b938 has the 0th input without tokens, and the 3rd input with 400 CACHET (if it failed, it would have the 0th input with 200 CACHET and the 3rd input without any tokens)
Reviewers: Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D16577