[9.18] Add workaround for jemalloc linking order
Because we don't use jemalloc functions directly, but only via the libisc library, the dynamic linker might pull the jemalloc library too late when memory has been already allocated via standard libc allocator.
Add a workaround round isc_mem_create() that makes the dynamic linker to pull jemalloc earlier than libc.
(cherry picked from commit 41a0ee10)
Closes #4404 (closed) Backport of !8609 (merged)
Edited by Ondřej Surý