jim.c: many small code and doc cleanups

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: improve expression optimiser

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: only complain on unfreed objects if --maintainer

Probably only developers care about reference count mismatches
at exit.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: Fix Jim_ReplaceHashEntry() for ref counted objects

If both a val dup and a val destructor exist, need to
dup before destroying.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: Use key dup and val dup for dicts

Less manual handling of reference counts means less chance of
error and less code.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: Simplify calls to JimFreeCallFrame()

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c: simplifiy Jim_StrEqObj()

And use it from the expr evaluator

Signed-off-by: Steve Bennett <steveb@workware.net.au>
expr: remove custom number parsing for expr

And clean up expr parsing slightly

Signed-off-by: Steve Bennett <steveb@workware.net.au>
array: array set to non-dict should fail

Currently returns the error message but does not set JIM_ERR
Also add a test case

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.h: fix Jim_GetHashEntryVal()

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