[index] Create new TxIndex class.
Summary:
backports four commits from core PR13033:
f90c3a62f [index] TxIndex method to wait until caught up.
70d510d93 [index] Allow TxIndex sync thread to be interrupted.
94b4f8bbb [index] TxIndex initial sync thread.
34d68bf3a [index] Create new TxIndex class.
Depends D2901
Test Plan:
build (tests are available in a later commit but not compatible
with current FindTx definition)
Reviewers: #bitcoin_abc, deadalnix, jasonbcox, Fabien
Reviewed By: #bitcoin_abc, deadalnix
Maniphest Tasks: T617
Differential Revision: https://reviews.bitcoinabc.org/D2904