Add removal and leaf array/object support, better local variables.

Local variables are now keyed solely on the session-id, track their xid,
and are purged when the per session-id xid changes.