Move arena allocator implementation to deconz-lib.
Add sentinel guards to memory allocations to verify tracking (just to be sure, there wasn't a bug).
For realloc, reuse the allocated buffer if it is already large enough, which is a bit faster and safes resources.
In future the memory footprint can be reduced further by using a free list. The JS engine already only uses fixed 2048 kB of RAM which can likely be cut to ca. 300 KB for our use cases.
In future the memory footprint can be reduced further by using a free list. The JS engine already only uses fixed 2048 kB of RAM which can likely be cut to ca. 300 KB for our use cases.