Replace the toy arena implementation with a real one, based on allocating 8K chunks of memory by default.
simplifies a lot of error handling code, and fixes many memory leaks.