Refactor duplicate input check
Summary:
- Use std::unordered_set instead of std::set.
- Do not try to check duplicate input for coinbase.
- Always check duplicate input for regular transactions.
Test Plan:
make check
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1790