Use hasData/hasUndo instead of masking with BLOCK_HAVE_DATA/BLOCK_HAVE_UNDO
Summary:
As per title.
Depends on D1450
Test Plan:
make check
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: schancel, teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1451