fix improper handling of jsonc alloc dealloc, isolate raw C pointer handling; implement auto-advance on expired values