configure: add --with-libimsg option

add compat for explicit_bzero Looking at the build failure for the nix package on darwin I noticed that explicit_bzero is used by recallocarray but not included in the compat layer...

wrap unfreeze in ifdef instead of defining macros in compat.h. It's clearer that it's only for libevent2 this way

fix bufferevent tls I/O on libevent2 on libevent2 we need to wrap evbuffer_add with evbuffer_freeze/evbuffer_unfreeze. Not sure exactly why, probably because we're doing some evbuffer_enable/disable/enable-again. Retain compatibility with the custom libevent1 in base on OpenBSD.

use strcasestr to compare (and include the compat)

"humanize" byte progress i.e. trasform XYZ bytes to something readable

add compat for strsep

fixed strtonum prototype found by cage_: thanks!

don't include <err.h>, use the compat layer

added compat for ohash

add compat for memmem(3)

fix compat layer build

add bunch of compats for compatibility