Allow object pool to be disabled

Compile time option, for maintainer debugging

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Fix memory management of aio event handlers

It was possible for a handler to be deleted
(e.g. if the handler threw an error), but the
channel handle to still maintain a pointer to the
handler script.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Minor code cleanups

Prefer Jim_String() and Jim_Length() over Jim_GetString() where it makes sense.
Use Jim_ListGetIndex() where success is guaranteed.

Signed-off-by: Steve Bennett <steveb@workware.net.au>