[CMAKE] Use jemalloc as an allocator
Summary:
This adds an option to use the jemalloc library to provide the memory
allocation functions, which improves the performances (got a >40% gain
on ninja check duration).
For now the library is disabled by default, no version is enforced and
no documentation provided. This will be added later, after the library
gets added to the depends so it will build on all platforms.
Test Plan:
cmake -GNinja .. -DUSE_JEMALLOC_EXPERIMENTAL=ON ninja all check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6027