[refactor] extract function for past activation tests
Summary: height-based past activation tests use identical code; extract it to a function and call it passing the IsXEnabled function and height as parameters
Test Plan:
ninja check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D9444