Stats: fix mk_api usage and verify if JEMALLOC_STATS is set

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
Stats: fix stats handler, use build macros

Signed-off-by: Eduardo Silva <eduardo@monkey.io>