#9387 added a new test that uses libevent's event_set_mem_functions which is sometimes not included with libevent. In particular, Gentoo only enables this when libevent is installed with the "debug" option.

Currently, this causes the build to simply fail on tests:

```
test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_creation::test_method()’:
test/raii_event_tests.cpp:39:58: error: ‘event_set_mem_functions’ was not declared in this scope
     event_set_mem_functions(tag_malloc, realloc, tag_free);
                                                          ^
test/raii_event_tests.cpp: In member function ‘void raii_event_tests::raii_event_order::test_method()’:
test/raii_event_tests.cpp:68:58: error: ‘event_set_mem_functions’ was not declared in this scope
     event_set_mem_functions(tag_malloc, realloc, tag_free);
                                                          ^
Makefile:8355: recipe for target 'test/test_test_bitcoin-raii_event_tests.o' failed
```

Probably we should skip this test if libevent doesn't support overriding memory functions.

(event.h defines EVENT_SET_MEM_FUNCTIONS_IMPLEMENTED if it is available.)
{
    event_set_mem_functions(tag_malloc, realloc, tag_free);
    void* base_ptr = nullptr;
    void* event_ptr = nullptr;
    {
        auto base = obtain_event_base();
        auto event = obtain_event(base.get(), -1, 0, nullptr, nullptr);
        base_ptr = (void*)base.get();
        event_ptr = (void*)event.get();
        
        BOOST_CHECK(orders[base_ptr] < orders[event_ptr]);
    }
    
    BOOST_CHECK(orders[base_ptr] > orders[event_ptr]);
    event_set_mem_functions(malloc, realloc, free);
}
BOOST_AUTO_TEST_SUITE_END()
#endif