Use Qt signal for macOS Dock icon click event
Summary:
This moves the Dock icon click reaction code to the common place and allows some cleanup in obj_c code. According to the Apple's docs `class_replaceMethod` behaves as `class_addMethod`, if the method identified by name does not yet exist; or as `method_setImplementation`, if it does exist.
Partial backport of core PR14123 (commit ):
https://github.com/bitcoin/bitcoin/pull/14123/commits/2464925e7be832d4926b6204169bbbc1646c6368
Test Plan:
Build and run on OSX.
Check the dock icon is working as expected.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4480