PR10150:
7fd50c3 allow libevent logging to be updated during runtime (John Newbery)
5255aca [rpc] Add logging RPC (John Newbery)
4d9950d Set BCLog::LIBEVENT correctly for old libevent versions. (John Newbery)
Tree-SHA512: d6788a7205372c0528da71eca052910dfb055f2940ca884f422ff3db66e23a2b49c6a15b8f27d5255554fe5c5a928f5dd903fdc63b0bd6c8fa7783e77bb30fe8
Backport of Core PR10150:
https://github.com/bitcoin/bitcoin/pull/10150/
As is, Core's logging code as seen in PR10150 is incompatible with our own logging code. I Also pulled the `EnableOrDisableLogCategories()` function and the updated libevent filter code and `Logger::GetCategoryMask()` function from Core PR12954 which is a refactor of Core's logging code that makes it more closely mirror our own.
https://github.com/bitcoin/bitcoin/pull/12954/