[CMAKE] Improve FindEvent
Summary:
This diff uses the facilities introduced in D5339.
It allows for checking the minimum version on a best effort basis: it
requires to run a libevent function so is not practical when cross
compiling.
It also separates the targets for libevent and libevent_pthreads,
and improves the messages.
Depends on D5339.
Test Plan:
cmake -GNinja ..
Check the output prints both the event and event_pthread library
paths, as well as the include path.
ninja all check
Run the Gitian builds.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5393