Refactor IsFinalTx
Summary: The original code is needlessly convoluted. This does the same thing is a simpler manner.
Test Plan:
make check
Reviewers: freetrader, sickpig, kyuupichan, #bitcoin_abc
Reviewed By: freetrader, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D135